resource_conflict.module on line 389
James Durling - October 20, 2009 - 15:25
| Project: | Resource Conflict |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I am new to Drupal but when I try to enter content i get the following error:
user warning: 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 'AND '2009-10-20T14:15:00' < ) OR('2009-10-20T14:30:00' > AND '2009-10-' at line 2 query: SELECT DISTINCT nid FROM content_ WHERE('2009-10-20T14:15:00' >= AND '2009-10-20T14:15:00' < ) OR('2009-10-20T14:30:00' > AND '2009-10-20T14:30:00' <= ) OR('2009-10-20T14:15:00' <= AND '2009-10-20T14:30:00' >= ) in C:\wamp\www\Portal\sites\all\modules\resource_conflict\resource_conflict.module on line 389.
None of my oither modules which use date / time have an issue

#1
It seems like your database is messed up somehow; the query pasted above is selecting from 'content_' which likely doesn't exist.
Can you:
drupal_set_message($date_table);drupal_set_message($date_field);
content_.#2
It may not be the module...maybe it does not function they way I had hoped.
What I did was create a content type, with date fields and a text field (Select list for meeting room names) and for the node refernce I was selected the view (Was hoping I could select more than one...but I dont think so) for the calendars I had set-up which reported data based upn the text field selection.
Would be easier I guess if instead of the node reference I could use the text field for checking for conflicts.
#3
You need to use the node reference field for your meeting rooms, not the text field.
Take a look at the guide in progress over at #602920: Quick start guide. It needs work, but should help clear things up for you. And once you read that, please comment in that issue if you have any improvements. If reading that helps you get it working, then lets backtrack and figure out what conditions cause your error so we can detect that and handle it gracefully.
#4
It worked!
I was missing the 2nd content type and adding the node reference...Great module! I was able to use it to create meeting room reservation calendar for 7 meeting rooms...Thank you!!!!!
#5
Before you got it working, did your view return any nodes? I'm wondering if the problem is that there is a valid node reference, but no valid nodes to select, causing the issue.
#6
Before it worked I never got past the error originally posted