Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.