first php problems!

Discussion in 'Software' started by goldfish, Jul 5, 2003.

  1. goldfish

    goldfish Lt. Sushi.DC

    PHP:
    $db mysql_connet("localhost","goldfishphp","my password") or mysql_die("Unable to connect to database");
    mysql_select_db("goldfishphp_uk_db","$db);
    $sqlquery = "SELECT FROM articles WHERE id 1";
     
    $result = mysql_query($sqlquery,$db) or mysql_die("No record found!");
     
    $article = mysql_fetch_object($result);
     mysql_free_result(
    $result);
    whats wrong?

    the DB is right ,the password is right (in my script anyway ;)) and all the table names are right.... whats wrong?
     
  2. iamien

    iamien Cptn "Eh!"

    mysql_select_db("goldfishphp_uk_db","$db);
    should be
    mysql_select_db("goldfishphp_uk_db","$db");

    And

    $db = mysql_connet(
    should be
    $db = mysql_connect(
     
  3. goldfish

    goldfish Lt. Sushi.DC

    im dumb, alright? LOL!

    that was easy enough to solve...
     
  4. †T-Rex †

    †T-Rex † Specialist

    The most common bugs are the smallest mundane detail you could think of... irritates me to no end! Seems to take longer to find those kind of mistakes than it is to find logic or syntax errors... like finding a decimal point in a haystack :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds