Hi at all
i have put this simply code in my wher sql and it dont works
i have test the sql in phpmyadmin "where kms >= 90 and kms <= 110 and it is good
the code take a response and make 2 variables to emulate the between clause in where ?
Thank's at all
<?php
$kilom = JRequest::getString('kilom', '', 'post');
if ($kilom) {
$kilom2 = $kilom * 1,1;
$kilom = $kilom * 0,9;
echo " WHERE `kms` >= $kilom and `kms` <= $kilom2 ";
}
<!-- echo " WHERE `kms` = $kilom "; -->
?>
i have put this simply code in my wher sql and it dont works
i have test the sql in phpmyadmin "where kms >= 90 and kms <= 110 and it is good
the code take a response and make 2 variables to emulate the between clause in where ?
Thank's at all
Hi loul1933,
Please try using . as a decimal point instead of , $kilom2 = $kilom * 1.1;
Bob
Please try using . as a decimal point instead of , $kilom2 = $kilom * 1.1;
Bob
hi Bob,
I have do that and the résult is...
"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 SQL=SELECT count(*) FROM jos_crb_parcours
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 SQL=SELECT count(*) FROM jos_crb_parcours 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 SQL=SELECT count(*) FROM jos_crb_parcours "
I do not undeerstand how the sql code is generate can you tell me that please?
JL
I have do that and the résult is...
"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 SQL=SELECT count(*) FROM jos_crb_parcours
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 SQL=SELECT count(*) FROM jos_crb_parcours 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 SQL=SELECT count(*) FROM jos_crb_parcours "
I do not undeerstand how the sql code is generate can you tell me that please?
JL
Hi Bob,
What is the solution to see the execution of the code in chronoconnectivity
I have look to mysql to see the rules of the command "where" and i have see nothing to debug my problem
Thank's at you
JL
What is the solution to see the execution of the code in chronoconnectivity
I have look to mysql to see the rules of the command "where" and i have see nothing to debug my problem
Thank's at you
JL
Hi Bob,
YESSSSS i have found a solution : parentheses
echo " WHERE (`kms` >= $kilom) AND (`kms` <= $kilom2) ";
and the result is good
My question to debug is always "d'actualité"
Nice W-E
Jean Louis
YESSSSS i have found a solution : parentheses
echo " WHERE (`kms` >= $kilom) AND (`kms` <= $kilom2) ";
and the result is good
My question to debug is always "d'actualité"
Nice W-E
Jean Louis
This topic is locked and no more replies can be posted.