| | #1 |
| Warrior Member Join Date: 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
Hi, can someone help! I'm new to php and mysql and making good progress. But I am stumped with a call to a mysql stored proc/routine. It runs prefectly well in mysql reutrning just the number of rows in a table. But I cannot get it to work in PHP. I have even stripped out all the IN to avoid any confusion. Here my routine SQL Code PHP Code: Here my PHP code PHP Code: Relax: watch latest fantasy movies | watch latest romance movies | watch bad moms movies. Good fun! |
| | |
| |
| | #2 |
| Warrior Member War Room Member | ncalabroso any thoughts?
|
| |
| | #3 |
| Active Warrior Join Date: 2016
Posts: 57
Thanks: 1
Thanked 11 Times in 10 Posts
|
Have you tried it using echo $row[0] in place of your code print_r($row); i think you should check it using it
|
| |
| | #4 |
| Bananas are Yellow! Registered Member War Room Member Join Date: 2013 Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4 |
I keep looking at that WHERE StaffID = StaffID clause and wondering if that's the issue. I'm guessing that StaffID is the name of a column, and you're also using the same identifier as a variable to pass an intended value. That might also explain why it worked in isolation, since you likely just used the 4 directly then. You're probably using the procedure as a step for learning, in which case, that's great. But if this is part of a real-world solution, I'd gently suggest that you may be making things too complicated; you could simply invoke the one SELECT directly from the PHP. Also, please consider PDO; it's a bit easier and more standard moving forward. |
| Put MY voice on YOUR video: AwesomeAmericanAudio.com | |
| |
|
| Bookmarks |
| Tags |
| call, mysql, mysqli, routine |
| |