shana.jk Posted April 11, 2008 Posted April 11, 2008 all my .php doc request tables in ALL CAPS... and all my mySql tables are in lower case. What can i do its causing it not to be able to locate the tables becuase its looking for lower case. I can change all of them.... :'( but that would suck. Is there anyway to make it not case sensitive? example of one error 1146 - Table 'bpbponl_store.PRODUCTS_DESCRIPTION' doesn't exist If i change PRODUCTS_DESCRIPTION to all lower case in the .php file it works.
♥FWR Media Posted April 11, 2008 Posted April 11, 2008 all my .php doc request tables in ALL CAPS... and all my mySql tables are in lower case. What can i do its causing it not to be able to locate the tables becuase its looking for lower case. I can change all of them.... :'( but that would suck. Is there anyway to make it not case sensitive? example of one error 1146 - Table 'bpbponl_store.PRODUCTS_DESCRIPTION' doesn't exist If i change PRODUCTS_DESCRIPTION to all lower case in the .php file it works. You may be messing with things you don't quite understand so be careful. In oscommerce database names are defined in .. catalog/includes/database_names.php .. e.g. define('TABLE_PRODUCTS_DESCRIPTION', 'products_description'); The constant TABLE_PRODUCTS_DESCRIPTION has a value of products_description So, if you take a typical query from product_info.php it looks like .. $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); By changing TABLE_PRODUCTS_DESCRIPTION to products_description you are using its real name as opposed to its defined name which is bad coding practice and will get you into all sorts of problems later. Hope that helps Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
shana.jk Posted April 11, 2008 Author Posted April 11, 2008 You may be messing with things you don't quite understand so be careful. In oscommerce database names are defined in .. catalog/includes/database_names.php .. e.g. define('TABLE_PRODUCTS_DESCRIPTION', 'products_description'); The constant TABLE_PRODUCTS_DESCRIPTION has a value of products_description So, if you take a typical query from product_info.php it looks like .. $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); By changing TABLE_PRODUCTS_DESCRIPTION to products_description you are using its real name as opposed to its defined name which is bad coding practice and will get you into all sorts of problems later. Hope that helps Well thats fine i would rather not change it.... So how do i fix the error? I dont want to have to go in and change every file anyway. I get the error on everything.
arietis Posted April 12, 2008 Posted April 12, 2008 So how do i fix the error? how about you post the code that you are trying to get to work? that way we can help you through the changes needed to get it to work properly. if you're trying to do "select * from TABLE_PRODUCTS_DESCRIPTION" it won't work, but "select * from " . TABLE_PRODUCTS_DESCRIPTION will because now you're using the defined value of TABLE_PRODUCTS_DESCRIPTION, which is "products_description". but to answer your original question, mysql is *not* case sensitive.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.