Bug #78285
closedRare bug with sql
0%
Description
i have a code in my plugin
$where = "item=".$product['code']; $resArr = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows("*", "tx_uwkmrma_domain_model_products", $where);
i use this same query at 2 points in my code, at first point it gives me data.
at second point it gives me sql error
ERROR => 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1' (146 chars) lastBuiltQuery => 'SELECT * FROM tx_uwkmrma_domain_model_products WHERE item=' (58 chars)
as you can see my where part is stripped of product code.
made an error in query by changing table name into tx_uwkmrma_domain_model_product so it's product instead of products
debug output is :
ERROR => 'Table 'simcotest_db.tx_uwkmrma_domain_model_product' doesn't exist' (66 chars) lastBuiltQuery => 'SELECT * FROM tx_uwkmrma_domain_model_product WHERE item=1509000625' (67 chars)
what is wrong with it i can't find it, it works at one place at fails at another.
Updated by Wouter Wolters about 8 years ago
- Status changed from New to Rejected
Hi Naberd, this is not a place to ask for help. This is our bugtracker.
Please ask your question on our forum or join our Slack channel https://forger.typo3.org/slack
Thanks.
Updated by Naberd Zendi about 8 years ago
Wouter Wolters wrote:
Hi Naberd, this is not a place to ask for help. This is our bugtracker.
Please ask your question on our forum or join our Slack channel https://forger.typo3.org/slackThanks.
i think it's still a bug, never before i have encountered such issue. if in one function with same data i get no errors on query, and in another function with same part of code and data i get error that query is incorrect i guess that there is something wrong with querybuilder.
since if i make an error in query i do get full query with error that table name not exists.