Hi all,
Im really baffled with this one. I have 2 tables that i simply wish to row count and display. the first works fine, but i just cant get the second to work, even if i rename the results variable
the code is below
Im really baffled with this one. I have 2 tables that i simply wish to row count and display. the first works fine, but i just cant get the second to work, even if i rename the results variable
the code is below
Code:
<?php
$link = mysql_connect("localhost", "un", "pw") or die('error 1<hr>'.mysql_error());
mysql_select_db("db", $link) or die('error 2<hr>'.mysql_error());
$result = mysql_query("SELECT ID FROM tbl_sellers", $link) or die('Query1 Error<hr>'.mysql_error());
$num_rows = mysql_num_rows($result);
echo "$num_rows Private Seller records\n";
echo "<br>\n";
$result = "";
$result2 = mysql_query("SELECT id FROM index-peaform", $link) or die('Query2 Error<hr>'.mysql_error());
$num_rows = mysql_num_rows($result2);
echo "$num_rows records\n";
echo "<br>\n";
mysql_free_result($result2);
mysql_close($link);
?>
Comment