#1
  1. No Profile Picture
    evilsizord
    Guest
    Devshed Newbie (0 - 499 posts)
    This is most likely a stupid question, but i am attempting to assign the result of a mysql_query to a variable, and it is giving me a parse error on the line where i try that
    : submitNum = $myrow["submitnum"];

    here is what i have:

    $result = mysql_query("SELECT * FROM bbbforum");

    if ($myrow = mysql_fetch_array($result)) {

    do {

    if ($myrow["submitnum"] > submitNum)

    submitNum = $myrow["submitnum"];

    } while ($myrow = mysql_fetch_array($result));

    } else {

    echo "Error: No records found";

    }

    i'm just trying to get the highest # in the submitnum field...
  2. #2
  3. No Profile Picture
    Christophe Gerbier
    Guest
    Devshed Newbie (0 - 499 posts)
    hi,

    should not read :

    $submitnum = $myrow["submitnum"]; ?

    note the "$" before "submitnum".

    regards.
    ChG.

Similar Threads

  1. Stupid Beginners Question
    By nsorroll in forum C Programming
    Replies: 8
    Last Post: January 29th, 2004, 12:48 PM
  2. Stupid IO question
    By theperfectsoup in forum Python Programming
    Replies: 1
    Last Post: January 26th, 2004, 04:39 PM
  3. Replies: 14
    Last Post: January 15th, 2004, 01:37 PM
  4. Stupid performance question
    By avrfreak in forum PostgreSQL Help
    Replies: 3
    Last Post: December 16th, 2003, 02:44 AM
  5. Radio Buttons
    By Ulysses Freeman in forum HTML Programming
    Replies: 4
    Last Post: November 15th, 2003, 09:57 PM

IMN logo majestic logo threadwatch logo seochat tools logo