mysql_fetch_row(): supplied argument is not a valid MySQL
Posted: Mon Dec 05, 2005 11:32 pm
Sami | Please use
regards,
Sami | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
i got this error and i really have no idea to solve that problem. here my code:Code: Select all
include "mysql.php";
$mydbcon = new db_sql();
$mydbcon->connect();
$sql = "SELECT max(id) FROM order";
$result = mysql_query($sql);
if (isset($result))
{
$maxid = mysql_fetch_row($result);
if ($maxid == false)
$maxid = 1;
else
$maxid = $maxid + 1;
}
else
$maxid = 1;Sami | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]