Jump to content

[SOLVED] why Query failed. Table 'XXXX_XXXX.staff_info' doesn't exist


Recommended Posts

ii.... i new in system development. i have a system in webserver. than i have another system to add at current sytem. current system use other database for example kkkdb and the new system use other database such as mecdb.

the address for original web is http://www.XXXXX.com.my

 

and for sub is http://www.XXXXX.com.my/xxxxxExpensesxxxxx

 

when i try to log on

 

i got this message

 

Query failed. Table 'XXXX_XXXX.staff_info' doesn't exist.i think its because of database.before i put at server for database connection i wrote like this

 

 

<?php 
$dbhost = 'localhost'; 
$dbuser = 'root'; 
$dbpass = ''; 

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); 

$dbname = 'mecdb'; 
mysql_select_db($dbname); 
?> 

 

after put at server my friend change to

 

 

<?php 
$dbhost='localhost'; 
$dbuser='XXXXX'; 
$dbpass='XXXXX'; 
$conn=mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); 
$dbname='XXXXX'; 
mysql_select_db($dbname); 
?> 

 

i dont know to solve this problem. how come this message "Query failed. Table 'XXX_XXX.staff_info' doesn't exist" appear

The error is saying a Query failed, which means you ran something like:

 

mysql_query("SELECT * FROM a_table");

 

The query is saying that staff_info doesn't exist. So you need to create it.

what table?

 

Exactly, what table?  Do you have a table to select from?

 

"Query failed. Table 'XXX_XXX.staff_info' doesn't exist" appear

 

These error messages sometimes actually mean something.

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.