Re: Change styling depending on var value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mari Masuda wrote:

This may be a dumb question, but did you actually fetch the db query's results and put them in $row before trying to use $row?  In MySQL you could do something like:

$query = "select * from my_table";
$result = mysql_query($query);
$row = mysql_fetch_array($result);  //this statement would need to be inside of a loop if there is more than one result

Thanks, Mari. That was it: I usually declare the variables first, then on with the rest of the code. I had inserted the $row conditional values right after the vars, before the rest of the query...just plain dumb.

Cheers --- Phil

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux