Hello,
Is it possible to use the substring_index function?
I have an error:
[23-Feb-2019 11:00:22 Europe/Paris] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 Erreur de syntaxe près de ‘}mcWskmuwn_{____oou}www_{oONE]xhmuwwl, LIMIT 0, 1’ à la ligne 1 in D:\wamp64\www\omsi\jqSuitePHP\php\PHPSuito\DBdrivers\jqGridPdo.php:118
Stack trace:
#0 D:\wamp64\www\omsi\jqSuitePHP\php\PHPSuito\DBdrivers\jqGridPdo.php(118): PDOStatement->execute()
#1 D:\wamp64\www\omsi\jqSuitePHP\php\PHPSuito\jqForm.php(2034): jqGridDB::execute(Object(PDOStatement), Array, Object(PDO))
#2 D:\wamp64\www\omsi\g_test.php(51): jqForm->renderForm(Array)
#3 {main}
thrown in D:\wamp64\www\omsi\jqSuitePHP\php\PHPSuito\DBdrivers\jqGridPdo.php on line 118
….
$form_formulaire->SelectCommand = ‘SELECT clef_1,
SUBSTRING_INDEX(heure_d,’|’,1) AS heure_d_0,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,2),’|’,-1) AS heure_d_1,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,3),’|’,-1) AS heure_d_2,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,4),’|’,-1) AS heure_d_3,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,5),’|’,-1) AS heure_d_4,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,6),’|’,-1) AS heure_d_5,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,7),’|’,-1) AS heure_d_6,
SUBSTRING_INDEX(SUBSTRING_INDEX(heure_d,’|’,8),’|’,-1) AS heure_d_7
FROM test WHERE clef_1 = 1′;
….
for ($i=0;$i<8;$i++) {
$name_heure=”heure_d_”.$i;
$elem_1[]=$form_formulaire->createElement($name_heure,’select’, array(‘datalist’=>$tab_heure, ‘name’ => $name_heure, ‘id’ => $name_heure));
}
…..
This query works properly out of jqform context
Thank you,
Best regards,
Christian
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top