Can you check the Query Export All Markbook Columns In Current Year
I am getting:
Your request failed with the following error: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
I just clicked the link to get the latest queries for the version of Gibbon. I did not make any changes to the query.
Gibbon v24.0.00
Query Builder v2.0.08
In another similar ticket, you said: The error you’re seeing relates to variables added to the query that are not used in the SQL syntax of the query, or vice versa, variables used in the SQL that are not set up for that query.
Hi Tieku, I’ve tested the “Export All Markbook Columns In Current Year” query and it runs locally and in production, and I’ve checked the server that the query is up to date. This particular query does not include any variables in the SQL and there are no variables defined for it, so it should be working fine on a fresh system. Can you double-check that this query hasn’t had any variables added to it? You could look in the queryBuilderQuery table to be certain, it should look identical to the original, with no bindValues:
Yes, a variable is preceded by a colon. I’ve checked the SQL for this query and there are no variables in the original copy from the server. Sure, feel free to post your SQL for comparison.
Yes so the point I am making is I have not changed the original query and yet I am getting the error:
Your request failed with the following error: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
SELECT
gibbonSchoolYear.name AS School Year,
gibbonCourse.nameShort AS Course,
gibbonCourseClass.nameShort AS Class,
gibbonUnit.name AS Unit,
gibbonPlannerEntry.name AS Lesson,
gibbonMarkbookColumn.name AS Name,
gibbonMarkbookColumn.description AS Description,
gibbonMarkbookColumn.type AS Type,
gibbonMarkbookColumn.date AS Date Added,
gibbonMarkbookColumn.attainment AS Assess Attainment?,
scaleAttainment.nameShort AS Attainment Scale,
‘N’ as Total Mark,
0 as Attainment Total Mark,
0 as Attainment Weighting,
rubricAttainment.name AS Attainment Rubric,
gibbonMarkbookColumn.effort AS Assess Effort?,
scaleEffort.nameShort AS Effort Scale,
rubricEffort.name AS Effort Rubric,
gibbonMarkbookColumn.comment AS Include Comment?,
gibbonMarkbookColumn.uploadedResponse AS Include Uploaded Response?,
gibbonMarkbookColumn.viewableStudents AS Viewable to Students,
gibbonMarkbookColumn.viewableParents AS Viewable to Parents,
gibbonMarkbookColumn.completeDate AS Go Live Date,
gibbonMarkbookColumn.complete AS Completed?,
gibbonMarkbookColumn.sequenceNumber AS Sequence Number
FROM
gibbonMarkbookColumn
JOIN gibbonCourseClass ON (gibbonMarkbookColumn.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID)
JOIN gibbonCourse ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID)
JOIN gibbonSchoolYear ON (gibbonCourse.gibbonSchoolYearID=gibbonSchoolYear.gibbonSchoolYearID)
LEFT JOIN gibbonUnit ON (gibbonMarkbookColumn.gibbonUnitID=gibbonUnit.gibbonUnitID)
LEFT JOIN gibbonPlannerEntry ON (gibbonMarkbookColumn.gibbonPlannerEntryID=gibbonPlannerEntry.gibbonPlannerEntryID)
LEFT JOIN gibbonScale AS scaleAttainment ON (gibbonMarkbookColumn.gibbonScaleIDAttainment=scaleAttainment.gibbonScaleID)
LEFT JOIN gibbonRubric AS rubricAttainment ON (gibbonMarkbookColumn.gibbonRubricIDAttainment=rubricAttainment.gibbonRubricID)
LEFT JOIN gibbonScale AS scaleEffort ON (gibbonMarkbookColumn.gibbonScaleIDEffort=scaleEffort.gibbonScaleID)
LEFT JOIN gibbonRubric AS rubricEffort ON (gibbonMarkbookColumn.gibbonRubricIDEffort=rubricEffort.gibbonRubricID)
WHERE
gibbonSchoolYear.status=‘Current’
ORDER BY
course, class, gibbonMarkbookColumn.sequenceNumber
Hi Tieku, I’ve checked the syntax above and also checked the database where queries are stored, they’re all working on this end. There are no parameters in the above query, and there are no bind values defined, so there shouldn’t be any errors generated. Can you share your Gibbon, Query Builder, PHP and MySQL versions, as well as check in the error log to see if there are any other errors generated along with this one that might suggest a cause.
Tieku, I have found no issues with the query on a fresh installation with fresh queries, so I suspect there must be something on your system. Can you try creating a new query with the exact same SQL, and no variables, and see if you are getting the same error?