0

I am not getting any results while passing the values intot the stores procuder I have the code below

<?php

     $a="26456";

     $result3=mysql_query('CALL getItemStock($a)');
     $row = mysql_fetch_array($result3);
?>
0

1 Answer 1

2

Try this:

    $result3=mysql_query('CALL getItemStock('.$a.')');

or

    $result3=mysql_query("CALL getItemStock($a)");

UPDATE:

If the parameter defined as string then you need to enclose it with quotes as well. For example:

    $a = 'I am String';
    $result3=mysql_query("CALL getItemStock('$a')");

However, if the parameter defined as number, then no quotation required.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.