Skip to content
Snippets Groups Projects
Commit 066be297 authored by Matt Butcher's avatar Matt Butcher
Browse files

attempting to fix PG/MySQL casting differences... AGAIN

parent a9603981
No related branches found
No related tags found
No related merge requests found
......@@ -901,7 +901,7 @@ function quiz_type_access_load($arg) {
*/
function quiz_get_number_of_questions($vid, $nid) {
// The CAST is required for PostgreSQL.
$sql = 'SELECT CAST (COUNT(*) AS INT) + CAST((SELECT number_of_random_questions FROM {quiz_node_properties} WHERE vid = %d AND nid = %d) AS INT)
$sql = 'SELECT CAST(COUNT(*) AS UNSIGNED INTEGER) + CAST((SELECT number_of_random_questions FROM {quiz_node_properties} WHERE vid = %d AND nid = %d) AS UNSIGNED INTEGER)
FROM {quiz_node_relationship} qnr
WHERE qnr.parent_vid = %d
AND qnr.parent_nid = %d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment