Can anyone help me debug this problem? This is part of a php script which I want to run from cron. I've been looking at it but cannot figure out what is wrong. The following line throws the PHP error "PHP Parse error: syntax error, unexpected T_LNUMBER in... on line..."
$sqlreadstmt = $db->query("
select distinct
rsdata.rs_variant,
rsdata.weeknumber,
rsdata.rs_moduleid,
rsdata.rs_objectidentifier,
trdata.tr_objectidentifier,
trdata.tr_testversion,
trdata.tr_plannedgate,
trdata.tr_vnvmethod,
testatussequence.tesequencenr,
trdata.tr_testexecutionstatus
from rsdata,trdata,module,variantgates,testatussequence
where rsdata.weeknumber="1339"
and rsdata.rs_moduleid = module.moduleid
and rsdata.weeknumber = trdata.weeknumber
and rsdata.rs_reviewstatus != "Obsolete"
and rsdata.rs_reviewstatus != "Rejected"
and rsdata.rs_introbjectidentifieralllevels != ""
and rsdata.rs_introbjectidentifieralllevels != "Unknown"
and find_in_set(trdata.tr_objectidentifier, (select rsdata.rs_introbjectidentifieralllevels))
and trdata.tr_plannedgate != ""
and trdata.tr_plannedgate != "Unknown"
and trdata.tr_plannedgate = variantgates.gate
and trdata.tr_variant = variantgates.variant
and trdata.tr_testexecutionstatus = testatussequence.testatus
order by
rs_variant ASC,
weeknumber ASC,
rs_moduleid ASC,
rs_objectidentifier ASC,
tr_testversion ASC,
tr_plannedgate ASC,
tr_vnvmethod ASC,
tesequencenr DESC;
");
Looks like the problem is that you have double quotes in your SQL statement, which is closing off the string used for your query. Try escaping the double quotes inside the SQL statement, or just use single quotes instead.