Jump to content

mySQL help


seaman

Recommended Posts

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?

 

Link to comment
https://forums.phpfreaks.com/topic/222197-mysql-help/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/222197-mysql-help/#findComment-1149497
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.