I've got the following code:
$db = mysql_connect("index","root,"pass");
mysql_select_db("mydb",$db);
$created = mktime();
$result = mysql_query("INSERT INTO tablename (num,created) VALUES ('','$created')");
$result = mysql_query("SELECT FROM tablename WHERE created = '$created')");
$row = mysql_fetch_row($result); /line21*/
$num = $row[0];
It gives me the following:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/wisdom.php on line 21
What am I doing wrong? Is there an easier way to do what I'm trying to do?
Thanks in advance,
Aciel