Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3979798
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:12:51+00:00 2026-05-20T05:12:51+00:00

I keep geting this error: Parse error: syntax error, unexpected ‘}’ in /Users/skline/Sites/tiptap/Site/tiptap/survey_current.php on

  • 0

I keep geting this error: Parse error: syntax error, unexpected '}' in /Users/skline/Sites/tiptap/Site/tiptap/survey_current.php on line 67

However, all my brackets are closed! I am really confused, thanks in advance..

<?php

    $dbc = mysql_connect(DATABASE_HOSTNAME,DATABASE_USERNAME, DATABASE_PASSWORD);
    if(!$dbc){
        die('Not connected' .mysql_error());
    }
    // Select database
    $db_selected = mysql_select_db(DATABASE_DATABASENAME, $dbc);
    // If fails, exit and cry
    if (!$db_selected) 
    {
        die ("can't connect : " .mysql_error());
    }

    function getCurrentSurvey($consumer_id){
        $last_survey_sql="SELECT DISTINCT ssr.SET_ID AS SET_ID,
                      ssr.SURVEY_ID AS SURVEY_ID
                      FROM branching_survey_responses AS bsr
                      JOIN survey_set_relation AS ssr
                      ON bsr.SET_ID=ssr.SET_ID
                      AND bsr.SET_ID=(SELECT Max(set_id)
                                    FROM branching_survey_responses
                                    WHERE CUSTOMER_ID=$consumer_id)
                      AND bsr.CUSTOMER_ID=$consumer_id;";

        $last_survey_result=mysql_query($last_survey_sql); 

        $last_set= mysql_result($last_survey_result,0,"SET_ID");

        $last_survey= mysql_result($last_survey_result,1,"SURVEY_ID");

        $last_question_sql="SELECT DISTINCT QUESTION_ID
                        FROM branching_survey_responses
                        WHERE QUESTION_ID=(SELECT Max(QUESTION_ID)
                                          FROM branching_survey_responses
                                          WHERE CUSTOMER_ID=$consumer_id
                                          AND SET_ID=$last_set)
                        AND CUSTOMER_ID=$consumer_id
                        AND SET_ID=$last_set;";

        $last_question_result=mysql_query($last_question_sql); 

        $last_question=mysql_result($last_question_result, 0, "QUESTION_ID");

        $survey_count_sql= "SELECT COUNT(*) AS survey_count
                        FROM surveytable;";

        $survey_count_result=mysql_query($survey_count_sql); 

        $survey_count=mysql_result($suvery_count_result, 0, "survey_count");

        $question_count_sql="SELECT Max(q.QUESTION_ID) AS question_count
                        FROM questions as q
                        JOIN branching_table as bt
                        ON bt.question_id=q.question_id
                        JOIN survey_set_relation as ssr
                        ON ssr.SET_ID=bt.SET_ID
                        AND ssr.SURVEY_ID=$last_survey;";

        $question_count_result=mysql_query($question_count_sql); 

        $question_count=mysql_result($question_count_result, 0, "question_count");

        $current_survey = array("last_survey"=>$last_survey, "last_question"=>$last_question, "survey_count"=>$survey_count, "last_survey"=>$question_count);

        return $current_survey

    }
    $test=getCurrentSurvey(217);

    echo $test['last_survey'];
    echo $test['last_question'];
    echo $test['survey_count'];
    echo $test['question_count'];

    ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:12:52+00:00Added an answer on May 20, 2026 at 5:12 am
        return $current_survey
    

    Missing semicolon on this line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am migrating my site from PHP 4 to 5 I keep getting this
I keep getting this error when I run my web app (asp.net mvc) in
OK I keep getting this error after about 3-4 minutes of churning: Timeout expired.
Has anyone been able to get sitemesh and gaelyk working together? This seems to
Hi guys for some weird reason I'm unable to send email using zend mail
I'm doing a little datamining project where a perl script grabs info from a
I am trying to create a program that has a button and a text
I'm trying to write a program which prompts the user to enter two 3×3
Well, I'm pretty much trying to figure out how to pull information from a
I am new to PHP and regular expression. I was going thorugh some online

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.