0

I have looked and tried but to no avail. I have a SP in MYSQL proc( par1 )

When I pass SQL string call proc(var1), the result is blank. I can call proc from MYSQL and get results but not from PHP page.

I have looked at so many ways and such but nothing works. does somebody have or can point me to example. simple. already have proc set and tested.

I can call SQL from PHP and get result sets just not from SP.

simple please

connect to DB
var = 2 ;
SQL = "call proc( $var ) "
call SQL/query with SQL
return result.  this particular sp only returns one row

the result is a recordset/rows of data.

thanks

Steve
  • 23
  • 3
  • possible duplicate of [Stored Procedures, MySQL and PHP](http://stackoverflow.com/questions/118506/stored-procedures-mysql-and-php) – Alex May 05 '15 at 14:06
  • I am thoroughly confused. I have been doing MSSQL & ASP.net/ASP for years. I can do that stuff blindfolded. As I look for examples to learn how to the PHP & MYSQL using Stored Procedure thing, it seems to be kind of vague. I can easily from PHP execute a SQL statement but doing Stored Proc doesn't seem to be an easy option. I see references to that one cannot trying with sqli and/or PDO . what am I missing??? – Steve May 06 '15 at 19:51
  • what did you try so far? – Alex May 06 '15 at 19:54
  • Alex, thanks for replying.... I can't find an example – Steve May 07 '15 at 11:52
  • here is code that I use to extract rows from db w/o error. however, if i set $SQL to call a SP and then try to output the rows i get NOTHING. – Steve May 07 '15 at 11:52
  • $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { } else { echo "0 results"; } $conn->close(); – Steve May 07 '15 at 11:54

0 Answers0