php - mysql_result() expects parameter 1 to be resource, string given -


त्रुटि $ quant = mysql_result ($ मात्रा, 0) में है; <पूर्व> $ मात्रा = ("SELECT product_qty_available उत्पाद से WHERE product_id = {$ _ POST ['id']}"); $ Quant = mysql_result ($ मात्रा, 0); यदि ($ quant & gt; $ _POST ['quant']) {गूंज "इनपुट मात्रा पार हो गई!"; } Else {exit; }

ऐसा इसलिए है क्योंकि आप वास्तव में अपने डेटाबेस से पूछताछ नहीं कर रहे हैं। < P> $ मात्रा = ("SELECT product_qty_available product WHERE product_id = {$ _ POST ['id']}");

होना चाहिए

< कोड> $ मात्रा = mysql_query ("SELECT product_qty_available उत्पाद से WHERE product_id = {$ _ POST ['id']}");

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -