Project

General

Profile

Actions

Feature #21902

closed

Support SQL "LOCATE"

Added by Steffen Kamper over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-01-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

the LOCATE function isn't supported in DBAL.
In templavoila i added this in select clause:

CASE WHEN LOCATE', 'tx_templavoila_tmplobj') . ', datastructure)>0 THEN 2 ELSE 1 END scope

Syntax of LOCATE:
LOCATE
Result is the position of needle, simular to php "strpos"

Simular would be following SQL functions:
POSITION, INSTR, SUBSTR, SUBSTRING, SUBSTRING_INDEX etc,
see http://dev.mysql.com/doc/refman/5.1/en/string-functions.html

(issue imported from #M13134)


Files

pre_13134_core-cleanup.diff (1.64 KB) pre_13134_core-cleanup.diff Administrator Admin, 2010-01-05 18:12
pre_13134_dbal-cleanup.diff (2.78 KB) pre_13134_dbal-cleanup.diff Administrator Admin, 2010-01-05 18:13
13134_core.diff (7.05 KB) 13134_core.diff Administrator Admin, 2010-01-05 18:13
13134_dbal.diff (26.5 KB) 13134_dbal.diff Administrator Admin, 2010-01-05 18:14

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #21903: Support SQL "CASE WHEN"ClosedXavier Perseguers2010-01-02

Actions
Actions #1

Updated by Xavier Perseguers over 14 years ago

Actually there is two needs here, one for supporting LOCATE and one for supporting CASE

Actions #3

Updated by Xavier Perseguers over 14 years ago

Found some nice table for Oracle's equivalent in MSSQL:
http://www.dba-oracle.com/oracle_news/2005_12_16_sql_syntax_differences.htm

Actions #4

Updated by Xavier Perseguers over 14 years ago

Committed pre_13134_*-cleanup.diff to

Core trunk (rev. 6725)
DBAL trunk (rev. 28422)

Committed 13134_*.diff to

Core trunk (rev. 6726)
DBAL trunk (rev. 28423)

Actions

Also available in: Atom PDF