phrozenflame Posted December 31, 2006 Share Posted December 31, 2006 I'm having the following problem that maybe one of you can help me with. When I query the database with PHP the result I get is FALSE. However when I go through SQLadmin it works. My code for works like this:$query = "SELECT user_id, username, password, first_name, last_name, email, verify, number_decks, study_interests FROM users WHERE username = 'Buyocat' AND password = MD5 ('password')";$result = @mysql_query ($query);if (is_bool($result)) print "Boolean" // this printsif ($result) {while ($data = mysql_fetch_array($result, MYSQL_NUM)) print $data[0];} // that doesn't printAs may be apparent this is a log in script. Insert scripts before this do work using the same machinery. If anyone has any idea what the problem might be I would really appreciate the help Link to comment https://forums.phpfreaks.com/topic/32335-mysql-faliure/ Share on other sites More sharing options...
Daveyboy Posted December 31, 2006 Share Posted December 31, 2006 sounds like you need to define your Mysql connection parameters first, also make sure you have an }else{ echo mysql_error (); to show all MySql errors. Link to comment https://forums.phpfreaks.com/topic/32335-mysql-faliure/#findComment-150148 Share on other sites More sharing options...
phrozenflame Posted December 31, 2006 Author Share Posted December 31, 2006 Ok thanks Link to comment https://forums.phpfreaks.com/topic/32335-mysql-faliure/#findComment-150334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.