What sort of error is this, I mean while updating field if I use ”, I am getting this error.
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\Program Files\xampp\htdocs\shadaab\aaction.php on line 87
ON 86-87 I have this query
$result = mysql_query("SELECT name FROM album WHERE name='$name'");
if(mysql_num_rows($result) != 0)
Pretty popular question on SO. It means your query failed, so
$resultisfalse.Add
To see what exactly error was. Most probably you have some illegal characters in
$namevariable. So, before embedding it into query string, you need tomysql_escape_string()it.Btw, your code is subject to SQL-injection. So, you’d better use prepared_statements