thecase Posted June 19, 2009 Share Posted June 19, 2009 Hi, If I do this $filename = 'replays/000Speeda00TMfff01004029.Replay.Gbx'; $result = mysql_query("SELECT download1 FROM race WHERE download1 = $filename"); $num_rows = mysql_num_rows($result); echo "$num_rows Rows\n"; The output is just Rows. It doesnt count them, there is no number. Although when I do the SQL query in phpadmin it works Showing rows 0 - 16 (17 total, Query took 0.0004 sec) Have I set the query up wrong? Link to comment https://forums.phpfreaks.com/topic/162909-solved-mysql_num_rows-problem/ Share on other sites More sharing options...
kickstart Posted June 19, 2009 Share Posted June 19, 2009 Hi You need quotes around $finename. It is trying to treat $filename as a numeric value and probably failing. All the best Keith Link to comment https://forums.phpfreaks.com/topic/162909-solved-mysql_num_rows-problem/#findComment-859569 Share on other sites More sharing options...
thecase Posted June 19, 2009 Author Share Posted June 19, 2009 Thanks Link to comment https://forums.phpfreaks.com/topic/162909-solved-mysql_num_rows-problem/#findComment-859572 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.