Database Query result frustration |
Hi all,
Am having a hell of a time trying to figure out whats going wrong here or what maybe i am missing. Been troubleshooting this error for far to many hours now. I am writing a custom login library, but when I query the database for a username/email address, the query is not returning any results at all. I ran the same query itself in phpmyadmin and it is finding the result expected there. So I figure I will put it here and maybe you people might see something my blurring eyes are missing. Below is the relevant piece code: PHP Code: $sql = "SELECT user_id,user_group,username,passwd FROM users WHERE username=?"; EDIT Found the error! It was in the IF statement itself. It was all syntax errors with the count function that somehow were not being thrown. Not sure if thats a PHP Issue but perhaps the developers could write a wrapper around count for the databases that would simplify it further? Also one thing that puzzles me though is why is_array() is returning false on the result array when its clearly true? |
Messages In This Thread |
Database Query result frustration - by stlake2011 - 04-12-2020, 08:48 AM
RE: Database Query result frustration - by vincent78 - 04-12-2020, 02:43 PM
|