unexpected T_VARIABLE

gud day to all,

my problem is

Parse error: parse error, unexpected T_VARIABLE in D:myprogsxampphtdocsrhyanhrdempdtr.php on line 187

this is the line 187.
if ($query = “SELECT tbledited.fldendex, tbllogin.ndex FROM tbllogin INNER JOIN tbledited ON tbllogin.ndex=tbledited.fldendex WHERE tbllogin.EmpID=’$qemp[1]’” $result=mysql_query($query) while ( $data=mysql_fetch_array($result)))

i dont think that code is possible.

my problem is, i want to display the data where in both in table1 and table2

this is just a php error

u cant combine two assignments inside a if without “and”, “or”, &&, …

try
[php]$query = “SELECT tbledited.fldendex, tbllogin.ndex FROM tbllogin INNER JOIN tbledited ON tbllogin.ndex=tbledited.fldendex WHERE tbllogin.EmpID=’$qemp[1]’”;
if ($result=mysql_query($query)) while ( $data=mysql_fetch_array($result)) $data[]=$row;[/php]

and i think u don’t even need a INNER JOIN:
[php]$query = “SELECT tbllogin.ndex FROM tbledited, tbllogin WHERE tbllogin.ndex=tbledited.fldendex AND tbllogin.EmpID=’$qemp[1]’”;
if ($result=mysql_query($query)) while ( $data=mysql_fetch_array($result)) $data[]=$row[‘ndex’];[/php]
but i don’t know ur table-sturcture

edit: there was a closing bracket missing

i do dsame but the error is

Parse error: parse error, unexpected T_WHILE in D:myprogsxampphtdocsrhyanhrdempdtr.php on line 188

closing braket missing.

edited my post

Sponsor our Newsletter | Privacy Policy | Terms of Service