Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Regex and Sql Queries containing + (Regex and Sql Queries containing +)
Regex and Sql Queries containing + [message #6726] Mon, 17 July 2017 19:43 Go to next message
Laevus is currently offline  Laevus
Messages: 5
Registered: October 2016
Junior Member
Dear Tony,

I have calendar data that must be loaded into a scheduler for display.
I must get the calendar data from the current day and one year into the future.

The following query works with MySql 5.6:

select * from calendar where dt between curdate() and curdate() + interval 365 day;

When I run the same query through Radicore 2.04.1, I get the following error:

sys0060
sys0061
2017-07-18 01:10:46
sys0063 Cannot extract token from: '+ interval 365 day' (# 256)
sys0065 7678 C:\xampp\htdocs\****\includes_erp\include.library.inc
sys0066 /****/calendar.php
sys0187 C:\xampp\htdocs\****
sys0183 ::1
sys0184 localhost
sys0185 localhost
sys0068 ::1

If I remove the + from the query, I can move forward (with a correctly reported ill-formed sql query error).
It seems that there is a bug in the regex portion of the code.
Or I have missed something silly.

Thank you for your time.

`Laevus
Re: Regex and Sql Queries containing + [message #6730 is a reply to message #6726] Tue, 18 July 2017 06:10 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2055
Registered: April 2006
Location: Surrey, UK
Senior Member
Try the updated include.library.inc in the attached file.

Re: Regex and Sql Queries containing + [message #6734 is a reply to message #6730] Tue, 18 July 2017 14:27 Go to previous message
Laevus is currently offline  Laevus
Messages: 5
Registered: October 2016
Junior Member
The attached file fixes the problem.

Thank you for such a speedy fix.

`Laevus
Previous Topic: postgresql error using lower/upper/ilike functions
Goto Forum:
  


Current Time: Fri Aug 18 02:50:15 EDT 2017

Total time taken to generate the page: 0.06405 seconds