Project

General

Profile

Actions

Bug #78285

closed

Rare bug with sql

Added by Naberd Zendi over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2016-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Wouter Wolters over 7 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.

Actions #2

Updated by Naberd Zendi over 7 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/slack

Thanks.

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.

Actions

Also available in: Atom PDF