How to do this in my app. MySql
Posted: Tue Oct 06, 2020 12:20 am
Hi, please any help with codding this.
I want do this request in php.
"SELECT * FROM movgral WHERE cta = '999.1' AND fecha >= STR_TO_DATE('01-05-2020','%d-%m-%Y' ) AND fecha <= STR_TO_DATE('31-05-2020','%d-%m-%Y' )";
This sintax work in xampp editor, but when I write in my program doesn't.
$resultados = mysqli_query($conexion,"SELECT * FROM movgral WHERE cta = '999.1' AND fecha >= STR_TO_DATE( '01-05-2020', '%d-%m-%Y') AND fecha <= STR_TO_DATE('31-05-2020','%d-%m-%Y' )" ;
$fecha1 is a date, $fecha2 is a date, $cta is a string.
Thank you.
Best regards.
SQL
I want do this request in php.
"SELECT * FROM movgral WHERE cta = '999.1' AND fecha >= STR_TO_DATE('01-05-2020','%d-%m-%Y' ) AND fecha <= STR_TO_DATE('31-05-2020','%d-%m-%Y' )";
This sintax work in xampp editor, but when I write in my program doesn't.
$resultados = mysqli_query($conexion,"SELECT * FROM movgral WHERE cta = '999.1' AND fecha >= STR_TO_DATE( '01-05-2020', '%d-%m-%Y') AND fecha <= STR_TO_DATE('31-05-2020','%d-%m-%Y' )" ;
$fecha1 is a date, $fecha2 is a date, $cta is a string.
Thank you.
Best regards.
SQL