I am using phpmyadmin 127.0.0.1.
The following code shows error but I cannot find anything wrong
$sde=" select * from
(select * from students1
WHERE
((PartCode = '$s1' OR PartCode =CONCAT('D', '$s1')) AND (ElectiveSubject1='$s11' OR ElectiveSubject2='$s11' OR ElectiveSubject3='$s11'))
ORDER BY PartCode, AdmitCode, RollCode
LIMIT ${'rr'.$rnn.'1b'}, ${'rr'.$rnn.'1'})
LIMIT $qa1, $qa2
";
$rde2=mysql_query($sde);
Please help me in finding the error. The error removes if we omit the portions outside the brakets ().