php - Mysqli Query is not returning any result -
i seem having trouble getting mysqli return result query. code is:
$db_conn = get_database(); //function returns static mysqli object reference if($result = $db_conn->query("select city state name='ca' ")) { $row = $result->fetch_object(); $city= $row->city; $result->close(); } else { echo $db_conn->error; }
when echo contents of city variable, contains nothing.
- check
get_database()
make sure proper database selected - the column
state
in clause same table name,state
. changename
instead if can.
Comments
Post a Comment