Krunk Posted June 16, 2007 Share Posted June 16, 2007 Good day all, I have an update.php script that is not working. I think the problem is the query string and the mysql_numrow function below. My other scripts of output and insert work fine. In vi, all color syntax matches except for the mysql_numrows function. It is white where the other functions are normal lite blue. When I take the single quotes out from '$id' the colors match and mysql_numrows() becomes lite blue but the script still does not work and it needs those quote. I get a blank update.php page in the browser. I would like to post the entire script but the rules say no php variables. Has anyone had this situation before. Thanks in advance. mysql_connect("192.168.2.6",$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM contacts WHERE id='$id'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); Quote Link to comment https://forums.phpfreaks.com/topic/55850-solved-mysql_numrows-problem-i-think/ Share on other sites More sharing options...
Krunk Posted June 16, 2007 Author Share Posted June 16, 2007 Half solved: mysql_numrows is supposed to be mysq_num_rows Quote Link to comment https://forums.phpfreaks.com/topic/55850-solved-mysql_numrows-problem-i-think/#findComment-276009 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.