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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
thecase Posted June 19, 2009 Author Share Posted June 19, 2009 Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.