Hello friendly helper types,
What is the problem here. I can't find any errors. I know it's there but as a
newbie I'm as blind as a bat at the moment. Thanks for your help.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
$link = mysql_connect( "localhost", $user, $pass );
if ( ! $link )
die( "Couldn't connect to MySQL" );
mysql_select_db( $db, $link )
or die ( "Couldn't open $db: ".mysql_error() );
$result = mysql_query( "select * from domains" );
$num_rows = mysql_num_rows( $result );
print "There are currently $num_rows rows in the table";
print "<table border=1>\n";
while ( $a_row = mysql_fetch_row( $result ) )
foreach ( $a_row as $field )
mysql_close( $link );
Powered by Linux - Mandrake 9.1
Registered Linux user # 290542 at http://counter.li.org
Registered Machine #'s 186951
Mandrake Club Silver Member
Source : my 100 % Microsoft-free personal computer.
09:25:17 up 1 day, 9:14, 1 user, load average: 1.02, 1.09, 1.08
Never mud wrestle with a pig.. you get dirty and the pig enjoys it!
Never try to teach a pig to dance. You waste your time and annoy the pig.