Skip to content

Commit

Permalink
Fixed more missing prefix things
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2003 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Aug 21, 2006
1 parent 3cb21c9 commit 837c799
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions common.php
Expand Up @@ -450,9 +450,10 @@ function getQuestionSum($surveyid)
*/
function getMaxgrouporder($surveyid)
{
global $surveyid ;
$max_sql = "SELECT max( group_order ) AS max FROM groups WHERE sid =$surveyid" ;
global $surveyid, $dbprefix ;
$max_sql = "SELECT max( group_order ) AS max FROM {$dbprefix}groups WHERE sid =$surveyid" ;
$max_result =db_execute_assoc($max_sql) ;
if isset
$maxrow = $max_result->FetchRow() ;
$current_max = $maxrow['max'];
if($current_max=="")
Expand All @@ -468,8 +469,8 @@ function getMaxgrouporder($surveyid)
*/
function getMaxquestionorder($gid)
{
global $surveyid ;
$max_sql = "SELECT max( question_order ) AS max FROM questions WHERE gid='$gid'" ;
global $surveyid, $dbprefix ;
$max_sql = "SELECT max( question_order ) AS max FROM {$dbprefix}questions WHERE gid='$gid'" ;
$max_result =db_execute_assoc($max_sql) ;
$maxrow = $max_result->FetchRow() ;
$current_max = $maxrow['max'];
Expand Down

0 comments on commit 837c799

Please sign in to comment.