![]() |
mysqli prepared statements num_rows
This keeps returning 0 results. Any ideas?
Code:
$qry1 = $db->prepare("SELECT id FROM user WHERE username = ? AND password = ?"); |
Quote:
lol - Just kidding - It's a small world... |
It has to do with binding arrays that are not declared
$params = array('ss', 'stan', 'Stanley'); $tmp = array(); foreach($params as $key => $value) $tmp[$key] = &$params[$key]; call_user_func_array(array($stmt, 'bind_param'), $tmp); use this style. |
Code:
$db->prepare("SELECT id FROM user WHERE username = ? AND password = ?"); |
Quote:
I've searched google but the sites I checked said to include store_result() which I tried but still 0 results returned. |
| All times are GMT -7. The time now is 06:45 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123