Attendance Summary by Date Page Error

Hello i hope someone can help me with my problem i am getting an error 1064 on the (( Attendance Summary by Date )) page please find a picture attached below.
Is there a way to fix this problem as going crazy trying to fix it myself with no luck.

((((( SQLSTATE[42000]: Syntax error or access violation: 1064 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 '/,COUNT(DISTINCT CASE WHEN'Present (PM) ’ THEN date ’ at line 1 )))))


Welcome to the Gibbon community. I have tried to recreate this one, but it is working fine for me, so I will need more information from you. Please can you let me know the Gibbon version (I am guessing v13.0.01), and PHP and MySQL versions?



Hi Orlando,

I’m the developer of that particular page, I took at look at your error and I believe I have a fix for you. The issue may have been a special character (a slash or bracket) in the attendance code causing the query to fail. I’ve updated the script to handle those characters (applied to the v14 development branch).

The fix is backwards compatible with v13. If you have access your Gibbon installation via FTP and feel comfortable making changes, the fix can be applied by replacing the file:

With the following updated file:

Otherwise, if you’d rather not change any files the issue can likely be solved by removing any characters such as a ( or \ from your attendance code names.

Hope this helps!

Hello Skuipers & Ross thank you so much Skuipers for your quick work on this matter its all working now 100% your fast help is much appreciated.
Seeing your the developer for this part of the site could i ask one more question, normally we take Attendance for AM and PM for each student, currently the Attendance Module won’t allow us to do this we can only do one how possible would it be to allow the to take Attendance twice daily.

Once more thank you for your help

PS i forgot to ask as well how difficult would it be to add a percent graft brake down on this page ? like
Total attendance 60% ECT
inclose i have a jpeg of one we use with Excel but it would be nice to have that function on the site.
Sorry for offloading all these things on you.

Thanks Orlando

Hi Orlando,

For AM/PM attendance, Gibbon v13 supports Attendance by Class. It would be possible to create placeholder classes (an AM and PM for each roll group), and assign teachers who take attendance to the respective classes. Then you’d be able to track attendance twice per day and track the reports for AM/PM attendance separately. It’s a bit of a workaround but should do the trick.

At this point the percentage breakdown would be a feature request :slight_smile: Could you please post as a new thread with a descriptive title? We have our hands full right now with some other work that is ongoing, but if it’s in a new thread we can update that thread if and when the feature gets built.

Otherwise, there is a module called Query Builder on the Extend page that offers lots of ways to extract data from Gibbon (with a license, currently free of charge). If you happen to have SQL familiarity, it could be possible to modify queries on there to generate the type of data you need and export it to excel spreadsheets.

Hope this helps!

  • Sandra

Hi Sandra

Thank you i will fallow your advise above thanks for the help :slight_smile: