new_php85 Posted September 19, 2008 Share Posted September 19, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/ Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 Where do you even select that table? Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/#findComment-645364 Share on other sites More sharing options...
new_php85 Posted September 19, 2008 Author Share Posted September 19, 2008 Where do you even select that table? what table? Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/#findComment-645405 Share on other sites More sharing options...
JasonLewis Posted September 19, 2008 Share Posted September 19, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/#findComment-645410 Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/#findComment-645705 Share on other sites More sharing options...
new_php85 Posted September 22, 2008 Author Share Posted September 22, 2008 okey...i got it.that table does not exit in my db.hehehhhe tq Quote Link to comment https://forums.phpfreaks.com/topic/124899-solved-why-query-failed-table-xxxx_xxxxstaff_info-doesnt-exist/#findComment-647535 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.