MySQL Forums
Forum List  »  Quality Assurance

A question
Posted by: Dmitar Stamov
Date: September 05, 2007 09:14AM

Hey guys i have some serious problem. My request did not give me back any info. It says that the table does not exist when actually it exists and i tested it and it works.

the function that works:

function tep_get_fueltypes($fueltypes_array = '') {
if (!is_array($fueltypes_array)) $fueltypes_array = array();

$fueltypes_query = tep_db_query("select fueltypes_id, fueltypes_name from " . TABLE_FUELTYPES . " order by fueltypes_name");
while ($fueltypes = tep_db_fetch_array($fueltypes_query)) {
$fueltypes_array[] = array('id' => $fueltypes['fueltypes_id'], 'text' => $fueltypes['fueltypes_name']);
}

return $fueltypes_array;
}


the function that didn't work

function tep_get_rdates($rdates_array = '') {
if (!is_array($rdates_array)) $rdates_array = array();

$rdates_query = tep_db_query("select rdates_id, rdates_name from " . TABLE_RDATES . " order by rdates_name");
while ($rdates = tep_db_fetch_array($rdates_query)) {
$rdates_array[] = array('id' => $rdates['rdates_id'], 'text' => $rdates['rdates_name']);
}

return $rdates_array;
}

Both tables are in the same database(and are almost identical). When I change the TABLE_RDATES to TABLE_FUELTYPES it works. I also tested all of my tables and it seems that only 5% of them could work out with that function. What is this and how I can fix it.
Thanks ins advance

Options: ReplyQuote


Subject
Views
Written By
Posted
A question
3953
September 05, 2007 09:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.