Error:Warning: mysql_query() expects parameter 1 to be string, resource given in C:\wamp\www\cdij\editquantity.php on line 8
Here is the Code:
$con=mysql_connect("localhost","root","","test");
$quantity=$_POST['txt_quantity'];
$name=$_POST['Fields'];
$table=$_POST['editwhat'];
$que="UPDATE `material` SET `material_quantity`='".$quantity."' WHERE `material_name`='".$name."'";
mysql_query($con,$que);
mysql_close($con);
?>
解决方案
You need to swap the $con and $que paramters in your mysql_query function.