You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Problem
I want to select repeating events from table. I need to cast the dates to months to check which yearly events are to include too. Fatal error: Uncaught TypeError: PDO::quote(): Argument #1 ($string) must be of type string, Raw given in /var/www
Detail Code
The detail code you are using causes the problem.
SELECT * FROM `calendar` WHERE (
start_date >= '2021-09-27'
AND start_date <= '2021-11-08'
) OR (
`repeat_interval` = 1
AND month(start_date) >= month('2021-09-27')
AND month(start_date) <= month('2021-11-08')
)
The text was updated successfully, but these errors were encountered:
The SELECT array is just a plain old associative PHP array so any elements with identical keys (i.e. your AND elements) will be overridden by the last declared element.
You need to make your AND elements uniquely keyed. In your code, add comments to the AND keys
cant make it to work with this part AND DayOfYear(start_date) BETWEEN DayOfYear(:from) AND DayOfYear(:to)
it doesnt even work if i try to put in the raw query and try to pass the arguments instead
Information
Describe the Problem
I want to select repeating events from table. I need to cast the dates to months to check which yearly events are to include too.
Fatal error: Uncaught TypeError: PDO::quote(): Argument #1 ($string) must be of type string, Raw given in /var/www
Detail Code
The detail code you are using causes the problem.
Not working either
Expected output
The text was updated successfully, but these errors were encountered: