csolano702 Posted September 1, 2009 Share Posted September 1, 2009 We recently moved to another server and I think that new server we moved to may be setup incorrectly... Issue: a simple query using "where" statements aren't working properly. I cant view any fields that are (int) Example: select * from banner where bannerid = '1' (bannerid is an INT) returns, Column "bannerid" not found Example: select * from banner where displaybanner = '1' (displaybannery is TINYINT) displays mixed results some of which are '0' if I do select * from banner and then show the field I see the data.. Am I going crazy? or is it a misconfiguration of PHP or Mysql or both? PHPVer 5.2.6 Full Code Example of a simple query that will just not run (Works if I copy and Paste query into phpmyadmin (which is hosted through another location other than our server) mysql_connect($host, $user, $pass); mysql_select_db('test'); $q = mysql_query("select * from banner where showbanner = '1' "); while($row = mysql_fetch_array($q)){ echo $row["name"]; } Is it the version of php that is the problem or just config? can someone help i'm going crazy over this simple issue has anybody had this problem before? ============================== From phpinfo() mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 5.0.45 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient Directive Local Value Master Value mysql.allow_persistent Off Off mysql.connect_timeout 60 60 mysql.default_host localhost localhost mysql.default_password no value no value mysql.default_port 3306 3306 mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off Link to comment https://forums.phpfreaks.com/topic/172719-solved-simple-query-issue-mysqlphp-can-someone-help/ Share on other sites More sharing options...
csolano702 Posted September 1, 2009 Author Share Posted September 1, 2009 Problem Solved: I was still using the older server DB ARG..... .always the simple things.. Link to comment https://forums.phpfreaks.com/topic/172719-solved-simple-query-issue-mysqlphp-can-someone-help/#findComment-910596 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.