Guest_imported
New member
- Jan 1, 1970
- 0
hi this fragment of code below is giving me problems..
what simple error have i made ? i just want to count
the number of records and display it on the screen?
wonder if anyone can help
<?php $db = mysql_pconnect("dbname", "user", "pass"
mysql_select_db("dbname",$db);
$sql = "SELECT count (articleid) FROM articles a";
$result = mysql_query($sql);
$myrow = mysql_fetch_row($result);
printf("%s", $myrow[0]);
echo "\n";
?>
Warning: Supplied argument is not a valid MySQL result resource fetcharticlenumber.php3 on line 5
tek-tips.com
what simple error have i made ? i just want to count
the number of records and display it on the screen?
wonder if anyone can help
<?php $db = mysql_pconnect("dbname", "user", "pass"
mysql_select_db("dbname",$db);
$sql = "SELECT count (articleid) FROM articles a";
$result = mysql_query($sql);
$myrow = mysql_fetch_row($result);
printf("%s", $myrow[0]);
echo "\n";
?>
Warning: Supplied argument is not a valid MySQL result resource fetcharticlenumber.php3 on line 5
tek-tips.com