So far, I'm only working on the first 2 columns, Placeholder and English Text.

//Placeholder
$query_ph = "SELECT ph_name from placeholder";
$result_ph  = mysql_query($query_ph) or die('Query failed:'.mysql_error());

//English Text
$query_en = "SELECT text from content WHERE lan_id=1";
$result_en = mysql_query($query_en) or die('Query failed:'.mysql_error());
?>

  1. Identity column vs Unique ID generated in C# assembly

    Date: 12/12/06 (SQL Server)    Keywords: database, sql

    x-posted to '[info]'databases

    As part of our current SQL setup we've got an extended proc that calls a C++ DLL to generate a unique id for all db calls. This unique id is use as a primary key on a logging table that is inserted into (along with user id, destination stored proc and any params) prior to running the users call. Also this unique id is added to the params list and passed on to the destinition stored procedure. Finally the logging table is updated with the return code of the call.


    Unfortunately this DLL won't work under SQL 2005, therefore I'm rewriting as part of the upgrade. That isn't the problem. The problem is one of the DBAs asking why we just don't use an Identity column on the logging table. TBH I couldn't think of a reason why not, especially if we use SCOPE_IDENTITY rather than @@IDENTITY. The only reason I could think of is historical, ie the original developers didn't trust SQL Server to handle the load (the DLL has been used since at least SQL 6). Can you think of situation where the use of an Identity column would fail?

    Source: http://community.livejournal.com/sqlserver/54552.html

  2. mysql podcasts!

    Date: 12/14/06 (MySQL Communtiy)    Keywords: php, mysql, browser, html, sql, web

    I realized I haven't told Livejournal about the MySQL Podcast that's been produced. The third episode has been published -- see http://www.technocation.org to subscribe or search for "mysql" or "oursql" on your favorite site to find podcasts, including itunes. Episode 0 and Episode 1 are still available.

    Episode 2 is here! It's a bit late due to a computer crash and the fact that I sprained my ankle, but I think it's worth waiting for. Particularly since this week's feature is everyone's favorite -- performance tips!


    It's best to subscribe to the podcast by clicking the "podcast" graphic at http://www.technocation.org , or searching for "mysql" in your favorite podcast directory (including iTunes). But if you want to play episode 2 in your browser, visit http://technocation.org/index.php?option=com_content&task=view&id=22&Itemid=29

    Please consider promoting the show -- we have a 40 second promo ready for download at:

    http://www.technocation.org/podcasts/oursql/OurSQLpromo1.mp3

    Show Notes:
    News

    http://www.mysqlconf.com/

    Free Survey, win a free pass

    http://www.zoomerang.com/recipient/survey-intro.zgi?p=WEB225WZRG2XU7

    You can now find this podcast, OurSQL, on many podcast sites including:


    http://www.itunes.com

    http://www.podcastalley.com

    http://www.podfeed.net

    http://www.podcastblaster.com


    just search for "mysql" on any of those sites and you'll find the podcast. You can also find it at:


    http://feeds.feedburner.com/oursql


    Learning Resource

    Promo

    http://www.tech-in-sight.com/

    Feature

    Peter Zaitsev's blog post about count for InnoDB tables:
    http://www.mysqlperformanceblog.com/2006/12/01/count-for-innodb-tables/

    Acknowledgements/Sponsors

    http://www.technocation.org

    http://music.podshow.com

    http://www.russellwolff.com

    http://www.smallfishadventures.com/Home.html "The Thank you song" -- Smallfish




    You can Direct download oursql podcasts at:
    http://technocation.org/podcasts/oursql/

    If you have any feedback about this podcast, or want to suggest topics to cover in future podcasts, please email

    podcast@technocation.org

    You can also:

    Call the comment line at +1 617-674-2369

    Or use Odeo to leave a voice mail through your computer:
    http://odeo.com/sendmeamessage/Sheeri

    Or use the Technocation forums:
    http://tinyurl.com/sc6qw

    Source: http://community.livejournal.com/mysql/107360.html

  3. Dreamhost

    Date: 12/14/06 (PHP Community)    Keywords: php, mysql, sql, hosting

    DreamHost seem to get recommended every time anyone asks for a good host, but, has anyone had any problems?

    My current host (square1hosting.com) are sucking harder than something that sucks very hard, and have been for some time.

    I need a PHP5 host with MySQL and email for multiple domains at a reasonable price, dreamhost seems to be unbelievably good, which suggests to me they may be overloaded and therefore performance/availability might be dire.

    Anyone have any problems?

    Source: http://community.livejournal.com/php/521140.html

  4. PHP quiz scripts

    Date: 12/14/06 (PHP Community)    Keywords: php, mysql, sql

    I used a quiz script from Dodo in the past, but in september I switched hosts for my domain, and after I had uploaded all the files I discovered that the script just wouldn't work. The script is just a bunch of php files and my new host supports PHP just like my old host.

    Anyone used this script before?

    Where would I start troubleshooting? What things are significant in this host-switching case?

    I also tried to upload the uncustomized default files that came with the script, and still nothing. If the case is that it won't work whatever I do...



    Do any of you have a link to another linkware PHP non-MySQL quiz script? I need this: 10 questions w/ radiobuttons. If you have 7 or more correct you get sent to pageA.php, if you have 6 or less you go to pageB.php

    Thanks

    Edit: I got help and it works now:)

    Source: http://community.livejournal.com/php/520922.html

  5. Functions

    Date: 12/14/06 (MySQL Communtiy)    Keywords: mysql, sql

    I have a cluttered query to get the next week-day (minus weekends) which I'd like to place in a function to be used over and over. 

    Is there a way to write query snippets as a custom function for MySQL?    (something like SELECT NEWFUNCTION();)

    Source: http://community.livejournal.com/mysql/107585.html

  6. creating polls (huge security hole?)

    Date: 12/15/06 (WebDesign)    Keywords: php, mysql, sql, web

    So I'm reading a tutorial on creating polls using MySQL and PHP, and this is the php side of it.

    Is it me, or is this extremely bad to put on a webpage, what with it requiring a usename and password? Am I just not reading it properly?

    $host = 'localhost';
    $user = 'user';
    $pass = 'pass';

    $db = 'polls';
    print "\n";
    print "\n";
    print "Grand Old Opera Poll\n";
    print "\n";
    print "\n";
    print "
    \n";
    print "

    Which of these activities do you most enjoy?

    \n";
    $dbcon = mysql_connect($host, $user, $pass)
    or die('Unable to connect to server ' . $host);
    mysql_select_db($db) or die('Unable to find database ' . $db);
    $form_query = 'SELECT * FROM poll_answers';
    if($result = mysql_query($form_query)) {
    while($row = mysql_fetch_array($result)) {
    print "". $row['activity'] . "
    \n";
    }
    }
    print "\n";
    print "
    \n";
    print "

    See vote totals

    \n"
    ;
    print "
    \n";
    print "
    \n";
    ?>

    Source: http://community.livejournal.com/webdesign/1195771.html

  7. An intro

    Date: 12/17/06 (Asp Dot Net)    Keywords: php, programming, asp, sql, linux, google

    Hi everyone,

    I thought before I go any further I'd ask approval, and give a bit of a background on myself.

    in 2000, I was working for blue chip clients as an asp programmer, and then discovered I had chronic Lyme disease, which I am currently under treatment for, but its left me with a six year gap in knowledge, Yes I've gone back to the Olde Faithfull Wrox books, MSDN etc for .net2 but I am finding so much has changed, I am fairly competent with C++ asp, VBscript and ECMA C# is completely new to me!

    to get me back to programming I bought a 2nd user server, which is running 2k3 enterprise ed. and have a 2nd machine running mssql 2005, I installed Visual Studio Pro, and thought that a couple of the Starter kits would prove a good place to start, oh How wrong I have been!

    Firstly: I tried theBeerHouse kit, hmmn, yes it runs on Localhost, but will the blasted thing run on a inbound connection Will it heck, I've trawled google for answers, worked arround issues, damn it I could have written the lot in asp quicker! or even as a Com+ application. I thought .net2 was supposed to be easier.

    But alas I think not unless I am completely missing something, the last thing I want to do is learn PHP! I'd rather eat a linux computer first!!

    So whats your advise for someone getting back into this, where did you start and if you have an indespensible book what is it?

    Debate

    Source: http://community.livejournal.com/aspdotnet/80741.html

  8. Finnish mySQL support was 3rd most-read story of 2006 on open source blog

    Date: 12/18/06 (Open Source)    Keywords: mysql, database, sql, web

    Small companies face a Hobson's Choice as they grow. They may start with mySQL, a solid, simple database, but they wonder whether it will scale as they grow. Given the penchant of Web companies to grow exponentially if they turn out to be winners, this is a question that is occuring earlier-and-earlier in these companies' lives.

    Source: http://feeds.feedburner.com/~r/zdnet/open-source/~3/63255940/

  9. PHP/MySQL question

    Date: 12/18/06 (PHP Community)    Keywords: php, mysql, sql

    I am applying for a job and have been working with PHP since PHP3, unfortunately not so lucky with MySQL and have only been working with that for about 2 years now and still feel awkward with it.

    So the job interviewed me and wants me to come back to take a 1 hour test to make sure that my knowledge matches what they want, or what level my knowledge is at, not sure which. I was wondering if anyone would have any suggestions what areas I should sharpen up on/make sure I know all the options/tricks etc. on? And also does anyone know any self-scoring or automated PHP or PHP/MySQL tests out there on the net or care to make one? Would be much appreciated. I was using the Zend Certification book as a guideline but I'm too busy correcting typos and wondering what's write and wrong in the book :\

    Thanks!

    Source: http://community.livejournal.com/php/523205.html

  10. MySQL Database Podcast!

    Date: 12/19/06 (MySQL Communtiy)    Keywords: php, mysql, software, html, sql, java, spam, microsoft

    Episode 3 is here!

    If folks have ideas or suggestions for content, please let me know.



    You can Direct download all the oursql podcasts at:
    http://technocation.org/podcasts/oursql/

    Direct play this edition at:

    http://tinyurl.com/yy7pgz



    News

    Download MySQL Turbo Manager Free Edition at: http://www.mentattech.com/themes/mentat/download.html



    Wireless providers prefer MySQL over Oracle, Microsoft SQL Server over both:

    http://www.crn.com/sections/breakingnews/breakingnews.jhtml?articleId=196700062


    Learning Resource

    Artful Software's list of common queries. They also have an interesting e-book available, called "Get it Done with MySQL 5.0".

    http://www.artfulsoftware.com/queries.php


    DATEDIFF(), DAYOFWEEK() functions

    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

    Promo

    This week’s promotion comes from Geek Fu at http://www.geekfuactiongrip.com



    Feature

    Concurrency and Isolation Levels
    http://sheeri.net/index.php?p=123



    Acknowledgements

    http://www.technocation.org

    http://music.podshow.com

    http://www.russellwolff.com

    http://www.smallfishadventures.com/Home.html "The Thank you song" -- Smallfish


    Feedback

    If you have any feedback about this podcast, or want to suggest topics to cover in future podcasts, please email

    podcast@technocation.org This email address is being protected from spam bots, you need Javascript enabled to view it

    You can also:

    Call the comment line at +1 617-674-2369

    Or use Odeo to leave a voice mail through your computer:
    http://odeo.com/sendmeamessage/Sheeri

    Or use the Technocation forums:
    http://tinyurl.com/sc6qw

    Source: http://community.livejournal.com/mysql/108124.html

  11. Security concerns with User Sessions

    Date: 12/20/06 (PHP Community)    Keywords: mysql, database, sql, security

    As part of a development project, I'm currently developing a site which will require user login to access most of the actual site content. However, I want to ensure that I set this up with the most common security holes taken into account.

    The user data is stored in a MySQL database, with the username stored in cleartext and the password field contains the md5 hash of the actual password concatenated with a 10 character random salt string (which is stored in the database as cleartext).

    Login form data is passed via POST. Any data that is taken from or generated from the user will be passed through a sanitization function to prevent SQL injection attacks.

    To track the user's state, I am looking into using session variables. My current problem is how to determine if the user has been authenticated properly, ideally without having to make a database call on every single page where this needs to be verified.

    Does anyone have any suggestions as to some ways to authenticate the contents of a session to prevent man-in-the-middle/replay attacks? The obvious way would be to store the session ID in the database and check it every time, but that adds a lot of overhead.

    Also, if anyone can spot any glaring security issues that I've missed in the descriptions above, I'd really like to hear about it. I want to do this right the first time.

    Source: http://community.livejournal.com/php/523861.html

  12. Nested Loops??

    Date: 12/23/06 (PHP Community)    Keywords: php, mysql, html, sql

    Hi everyone, I'm a bit confused with PHP While Loops. =/

    Currently, I want to echo a table that has 4 columns, "Placeholder (ph_name)", "English Text (text)", Foreign Text (text area)", "Action (save)". 

    When I view the page, the table cells are all jumbled up.

    the html codes should look like that:

ph_nametexttext areasave

 
// Get each row of data on each iteration until there are no more rows

while($row_ph = mysql_fetch_array($result_ph)){
echo "";
echo "";

          while ($row_en = mysql_fetch_array($result_en)){
               echo "";
}
}
?>
PlaceholderEnglish TextForeign TextAction
";
echo $row_ph['ph_name'];
echo "
";
               echo $row_en['text'];
               echo "


How should I nest the loops? 
Thanks! (:

x-posted to '[info]'php_mysql

Source: http://community.livejournal.com/php/525071.html

  • PHP/MySQL connection error

    Date: 12/29/06 (PHP Community)    Keywords: php, mysql, sql

    Anyone have any idea why after establishing a pconnect with my MySQL server previously in the script when I try and run a query later on (without closing the connection) it throws the following error :

    Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\movies_dev\movies.php on line 18

    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\movies_dev\movies.php on line 18


    Ignore the line numbers infront of the code behind the cut, I pasted it on a pastebin and it threw it's own line numbers in and I don't have the time to cut them out.



    1.
    // this is the db_fns.php include file
    2.

    3.

    18.

    19.
    //
    20.

    21.
    //this is the main php file:
    22.

    23.
    \n\n\n";
    51.
    // echo "test run 1";
    52.
    echo "

    \n";
    53.
    echo "\n";
    54.
    echo "\n";
    55.
    echo "\n";
    56.
    echo "\n";
    57.
    echo "\n";
    58.
    echo "";
    59.
    }
    60.
    ?>
    61.

    62.
    // this is the error:
    63.

    64.
    Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\movies_dev\movies.php on line 18
    65.

    66.
    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\movies_dev\movies.php on line 18
    67.
    Error with query /# 1


    Source: http://community.livejournal.com/php/525946.html

  • Aggregation 101.

    Date: 12/29/06 (SQL Server)    Keywords: sql

    I'm overlooking the absurdly obvious, and I realize it...

    What, in T-SQL, is a way to do this:

    sum(count(distinct claimno)) as claimcount,...

    that does not involve getting this:

    Cannot perform an aggregate function on an expression containing an aggregate or a subquery.

    as a return message?

    (I would like to keep this as one statement rather than using temp tables, cursors, or anything like that as an intermediary.)

    TIA.

    Source: http://community.livejournal.com/sqlserver/54789.html

  • Fun game

    Date: 01/02/07 (Javascript Community)    Keywords: php, mysql, html, sql, java, spam

    I must have a bot watching my site, here is an example
    http://www.tfcdesign.com/spilledink/classifieds/sifc002n.html

    When I clear out their spam, it fills up immediately. Its kinda fun. Right now I have a javascrip that redirects their IP shows up. Apparrently JS doesnt work.

    The scripts are all perl and I havent used perl in over 6 years :) This site has been self maintaining since 1996.

    So, now I get to try and beat the bot.

    I've redone the site in PHP and MYSQL here
    http://www.spilledink.com/classifieds/electronics.php

    so it isn't a big deal. I havent shut down the old site because I make money from both.

    Eventually, the new site will be like Craigslist requiring a valid email and email validation. For this site I think I'll have to use PERL to kick this guy. ... or maybe just submit the form with javascript.

    Is there a way to tell if a specific visitor has javascript enabled? I'll have to see if PERL can do this.

    Source: http://community.livejournal.com/javascript/122894.html

  • vb.net / Foreign key data on detailsview inserts

    Date: 01/03/07 (Asp Dot Net)    Keywords: sql

    I'm trying to propagate a chosen parameter from a GridView to a DetailsView control where I will be inserting new data records.

    Here's my basic layout:

    page load
    -> display GridView1 (list all jobs in progress)
    user clicks on details link of a job entry
    -> display GridView2 (list each user-identified step for selected job)
    user clicks "Add step" link
    -> I need to pass the 'job number' used to populate GridView2 so that my newly created step will correctly be listed as a step for the job I selected after page load.

    One of my concerns is also trying to minimize code behind -- I am the only real programmer in our company and want to this project is as easy to maintain as possible should I ever move on.

    Is there a way to take my query string parameter sent to GridView2 page and use that in the custom Insert SQL statement for my SQLDataSource?

    Thanks for any advice you can share, or help you can point me towards.

    Source: http://community.livejournal.com/aspdotnet/81383.html

  • Давайте писать PHP игрушку.

    Date: 01/03/07 (PHP Development)    Keywords: php, mysql, sql

    Ищу людей для создания на общественных началах PHP BBMMOG. Понимаю, что это велосипед, который не гоже изобретать. Но важна не только цель, но и процесс!!!

    Приветствуются: графика, вебдезайн, идеи, желание создать свой игровой мир и управлять им.
    Предполагаемые направления:

  • бизнес / финансы
  • сельское хозяйство (по мотивам Harvest the moon - от нинтендо)
  • околодайвинговая тема
  • любые другие направления

    Что есть:
  • Желание творить
  • Хостинг с поддержкой PHP5 и MySql
  • Множество идей
  • Опыт в ООП, PHP, SQL и т.п.

    Можно писать напрямую мне.
  • Source: http://community.livejournal.com/php_dev/75394.html

  • PHP/MySQL Help

    Date: 01/05/07 (WebDesign)    Keywords: php, mysql, html, database, sql, web

    Hoping somebody here can help me..

    I'm going through the book PHP and MySQL Web Development by Luke Welling and Laura Thompson. I'm currently working through Chapter 26 (for those of you that have read it), Building User Authentication and Personalization. I've gotten through it pretty good so far, but am having some trouble with actually authenticating the user logins. My site is set up at http://test.aacapartsandsupplies.com. My problem is, whenever I click the login button, I always go to the member.php page.. even if I didn't put any login information in. It doesn't throw back any errors saying "you must be logged in to view this page", etc. Even if I do login, and I try to logout from member.php, it throws back the exception "you were not logged in, and so have not been logged out." I have registered some test users, and this happens on every login I've created.

    I'm not exactly sure where the problem lies. I'm wondering if anyone has read this book and might be able to help me out. Even if you haven't read it and know more about PHP/MySQL than I do, I'd appreciate any kind of help. Posting the code for the two files where I *think* the problem lies.


    < ?php

    // include function files for this application
    require_once('tokens_fns.php');
    session_start();

    //create short variable names
    $username = $_POST['username'];
    $passwd = $_POST['passwd'];

    if ($username && $passwd)
    // they have just tried logging in
    {
    try
    {
    login($username, $passwd);
    // if they are in the database register the user id
    $_SESSION['valid_user'] = $username;
    }
    catch(Exception $e)
    {
    // unsuccessful login
    do_html_header('Problem:');
    echo 'You could not be logged in.
    You must be logged in to view this page.';
    do_html_footer();
    exit;
    }
    }

    do_html_header('');

    display_user_menu('');

    check_valid_user('');

    ?>

    < div id="right">
    < div id="title">
    < h1>Welcome to your AACA Locker < ?php $_POST['username'] ?>
    < /div>

    Thanks for logging in! You may now view your custom reports, vote in our
    polls, and be sure to check for any rewards you may have won!


    < /div>

    < ?php

    do_html_footer('');
    ?>



    This is simply the login and check_valid_user functions:

    function login($username, $passwd)
    // check username and password with db
    // if yes, return true
    // else throw exception
    {
    // connect to db
    $conn = db_connect();

    // check if username is unique
    $result = $conn->query("select * from user
    where username='$username'
    and passwd = sha1('$passwd')");
    if (!$result)
    throw new Exception('Could not log you in.');

    if ($result->num_rows>0)
    return true;
    else
    throw new Exception('Could not log you in.');
    }

    function check_valid_user()
    // see if somebody is logged in and notify them if not
    {
    if (isset($_SESSION['valid_user']))
    {
    echo '
    ';
    echo 'Logged in as '.$_SESSION['valid_user'].'.';
    echo '
    ';
    }
    else
    {
    // they are not logged in
    echo '
    ';
    echo 'You are not logged in.
    ';
    exit;
    }
    }


    I can provide more code if needed.

    Thank you all in advance!!

    Source: http://community.livejournal.com/webdesign/1203673.html

  • SQL 2005 --> DB2 Bulk Loading

    Date: 01/05/07 (SQL Server)    Keywords: database, sql

    Hi all. Does anyone on this group have any experience in either Bulk Loading, ETL, or Replication between a SQL 2005 database and a DB2 database. There is a known problem with the translation of a VARGRAPHIC (db2 datatype) to SQL 2005, so I'm trying to find the best workaround for a datafile that is about 2 GIG. I know it's a long shot but I thought I'd holler. If I figure it out, I'll post my findings for benefit of the group.

    Source: http://community.livejournal.com/sqlserver/55189.html

  • Need Help

    Date: 01/08/07 (WebDesign)    Keywords: php, mysql, blogging, sql

    I need some help. I am working on my layout for my site. However, when I add the "blogging" tool that I am using with PHP the whole layout becomes wacked and out of order, I can't seem to figure it out.

    http://www.silence-stars.net/ (correct way)

    That is my site, its fine now, but if add the "blog" to the site, it becomes wacked.

    http://www.silence-stars.net/test.php

    Maybe I need another pair of eyes, maybe one of you can help me decipher where my problem is.

    But all in all, I need some critique on my site, what are your opinions?

    Edit
    Blogging tool is Cutenews. My site doesn't support MySQL so I can't use wordpress, or anything like it.

    Source: http://community.livejournal.com/webdesign/1205140.html

  • Previous page  ||  Next page


    antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home