Jump to content

Unexpected T_Constant_Encapsed_String


NONAME_2

Recommended Posts

hello, i have same prob.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/../form/formOne.php on line 26

<?php
include("../header.inc.php");
require_once inc_dataAccess;
require_once '../classes/public.class.php';
require_once '../classes/First.class.php';

$RegID = $_REQUEST["RegID"];
$StNo  = $_REQUEST["StNo"];

$query = "SELECT concat(PFName,' ',PLName) as FullName,StudentSpecs.StNo,BirthLoc,BirthDate,NID,DadName,
   persons.PersonID,concat(rel," ",subRel) as  Religion,MarStatus, Address2,PhoneNo,mobile,
   PEduSecName,PFldName,ShiftName
   FROM FirstInterview
   left join StudentSpecs using(StNo)
   left join persons on(StudentSpecs.PersonID=persons.PersonID)
   left join EducationalSections using(EduSecCode)
   left join StudyFields using(FldCode)
   left join StudyStatus using(StatusID)
  left join (select DomainValue,description as Rel from domains where DomainName='RELIGION') tmp1 on(tmp1.DomainValue=persons.Religion)
   left join (select DomainValue,description as subRel from domains where DomainName='SUB_RELIGION') tmp2 on(tmp2.DomainValue=persons.SubReligion)
   left join (select DomainValue,description as MarStatus from domains where DomainName='MARITAL_STATUS') tmp3
   on (tmp3.DomainValue=persons.MaritalStatus)
   left join (select DomainValue,description as ShiftName from domains where DomainName='SHIFT') tmp4 on(tmp4.DomainValue=StudentSpecs.shift)
   where  StudentSpecs.StNo =". $StNo ." and FirstInterview.RegID =" . $RegID ;
$temp = dataAccess::RUNQUERY($query)->GetRows();
$tbl_content = "";

there is a place in $query :pirate:

Link to comment
Share on other sites

$query = "SELECT concat(PFName,' ',PLName) as FullName,StudentSpecs.StNo,BirthLoc,BirthDate,NID,DadName,
   persons.PersonID,concat(rel," ",subRel) as  Religion,MarStatus, Address2,PhoneNo,mobile,

 

You need to escape the quotes in concat(rel," ",subRel) or change them to be single quotes.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.