seaman Posted December 20, 2010 Share Posted December 20, 2010 hello i'm getting this errors: Invalid query -- SELECT COUNT(*) FROM andrew_offline WHERE uid = 100001715547101 -- No database selected Invalid query -- SELECT * FROM andrew_actlog ORDER BY idx DESC LIMIT 0,200 -- No database selected Invalid query -- SELECT count(*) FROM andrew_offline WHERE status='T' -- No database selected info: $app_tbl = "andrew_offline"; $app_setting_tbl = "andrew_setting"; $app_job_tbl = "andrew_job"; $app_actlog_tbl = "andrew_actlog"; $default_actlog_view_size = 200; SELECT * FROM `andrew_offline` LIMIT 0 , 30 SELECT * FROM `andrew_actlog` LIMIT 0 , 30 How do i fix this? Quote Link to comment https://forums.phpfreaks.com/topic/222197-mysql-help/ Share on other sites More sharing options...
Adam Posted December 20, 2010 Share Posted December 20, 2010 As the error suggests, you're not actually 'on' any database. Are you running these queries from an administrator, or within a PHP script? If within a script you need to use mysql_select_db (or appropriate method if using a DB abstraction layer), or from within an administrator, the software should actually handle switching to the correct database, generally as you select it. Quote Link to comment https://forums.phpfreaks.com/topic/222197-mysql-help/#findComment-1149497 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.