Jump to content

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


new_php85

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.

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.