
November 27th, 2002, 09:01 PM
|
|
Contributing User
|
|
Join Date: Nov 2002
Posts: 61
Time spent in forums: < 1 sec
Reputation Power: 7
|
|
|
mysql_fetch_array() problem
Please can you help, i connect to my database, but then I cannot get the data from my table. (I am trying to send it to the browser)
PHP Code:
mysql_select_db("projectg");
$query = "SELECT modCode, modTitle ";
$query = "FROM lecfiles ";
$query = "ORDER BY modTitle ASC";
$result = mysql_query($query);
if (!$result) {
echo "...............Couldn't get file list";
}
while($row = mysql_fetch_array($result))
{
php echo "{$row['modCode']}";
php echo "{$row['modTitle']}";
}
I am well and truly baffled.
I get the following error in my browser...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\...\...\...
Any Ideas?
Gee

|