php - Converting from mysql to mysqli, getting empty results with this query -


this query never returns results, when there match , should giving me something. var_dump($result) returns null. $con valid , code gives no errors.

$con = new mysqli($dbhostname,$dbusername,$dbpwd,$dbname); $dbquery = "select field1, field2 people ucase(emailaddress) = ucase(?) , (status = 'a' or status = 'm')"; $stmt = $con->prepare($dbquery); $stmt->bind_param('s',$email); $stmt->execute(); $stmt->bind_result($result); 

i'm new mysqli i've done dumb here. please tell me missed.

i commented, formatting messed up, here suggesting. instead of dbquery string have, try this:

$dbquery = "select `field1`,`field2` `people` ucase(`emailaddress`) = ucase(?) , (`status`='a' or `status`='m')"; 

a similar problem outputted errors me, when not including ` in sql string.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -