I have a working PDA integrated database class. I have been working all my questions very efficiently but when I I try to cross the fixed price, so I was stuck. This value is:
DATE_SUB ('2010-11-03', INTERVAL 30 DAY) Now all my class questions are ready after work Is:
SELECT DATE (added) Date from date of data where (Added) & lt; =? When trying to pass the value: execute (code) from DATE_SUB ('2010-11-03', INETRVAL 30 DAY) function, no results found (but the query is being executed successfully) I tried to send the raw value ' 2010-11-03' . It is working correctly but did not widen the ceremony. Does anyone know that this is not being passed to execute the mysql function? You can not use placeholders replace this part of my SQL query
: Placeholders and their respective bound values can only match values. When you 2010-11-03 , you are passing a value - so it works. When you are trying to pass DATE_SUB ('2010-11-03, INTERVAL 30 DAY), then this value is not a value - so it does not work is.
You must rewrite your prepared statement, so the placeholder matches the date, and not the full expression:
SELECT DATE (Added) Date from date with data (Added) and lt; = DATE_SUB (?, INTERVAL 30 days) date ( / P>
Comments
Post a Comment