[PHP-DB] Anyone know why this won't return results?
html head titleResults Test/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ?php $server = mdotlims; $user = httpuser; $pass = pass; $db = mysql_connect($server,$user,$pass); if (!$db) { echo( pUnable to connect to the . database server at this time./p); exit(); } if (! mysql_select_db(lims_issues)) { echo(Unable to locate the issues . database at this time./p ); exit(); } $result = mysql_query(SELECT Notes FROM Bugs); if (!$result) { echo(pError performing query: . mysql_error() . /p); exit(); } While( $myrow = mysql_fetch_array($result) );{ echo (BR . $myrow[NOTES]); } mysql_free_result($result); ? /body /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Anyone know why this won't return results?
At 17:45 -0400 6/7/02, Blaine Dinsmore wrote: html head titleResults Test/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ?php $server = mdotlims; $user = httpuser; $pass = pass; $db = mysql_connect($server,$user,$pass); if (!$db) { echo( pUnable to connect to the . database server at this time./p); exit(); } if (! mysql_select_db(lims_issues)) { echo(Unable to locate the issues . database at this time./p ); exit(); } $result = mysql_query(SELECT Notes FROM Bugs); if (!$result) { echo(pError performing query: . mysql_error() . /p); exit(); } While( $myrow = mysql_fetch_array($result) );{ You have a semicolon on the previous line, which terminates the while loop - a bit prematurely, I'd guess. :-) echo (BR . $myrow[NOTES]); } mysql_free_result($result); ? /body /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Anyone know why this won't return results?
Thanks Paul, You were absolutely right! I can't believe I didn't see that hidden in there. That explains why I never got any error messages. Thanks again, Blaine Paul DuBois [EMAIL PROTECTED] 06/07/02 05:55PM At 17:45 -0400 6/7/02, Blaine Dinsmore wrote: html head titleResults Test/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ?php $server = mdotlims; $user = httpuser; $pass = pass; $db = @mysql_connect($server,$user,$pass); if (!$db) { echo( pUnable to connect to the . database server at this time./p); exit(); } if (! @mysql_select_db(lims_issues)) { echo(Unable to locate the issues . database at this time./p ); exit(); } $result = @mysql_query(SELECT Notes FROM Bugs); if (!$result) { echo(pError performing query: . mysql_error() . /p); exit(); } While( $myrow = mysql_fetch_array($result) );{ You have a semicolon on the previous line, which terminates the while loop - a bit prematurely, I'd guess. :-) echo (BR . $myrow[NOTES]); } mysql_free_result($result); ? /body /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php