I'm trying to do two seperate select statements and it doesn't want to display the second one. I'm new to php, and I can't figure this out. Here's the basic code.
| Code: |
| $db_conn = ocilogon("$user", "$pass", "$db");
if (!$db_conn) { echo "<h2>Bad Login</h2>"; exit; } echo "<html><body><center>"; $query="select class1, class2, class3, class4, class5,\n class6, class7, class8, class9, class10,\n class11, class12, class13 ,class14, class15, time_key"; $cmdstr = $query. " from tms.rawdata tr, calendar c\n where tr.calendar_key=c.calendar_key\n and linkid=".$linkid."\n and direction=".$direction."\n and datex between '".$sday."-".$smonth."-".$syear."' and '".$eday."-".$emonth."-".$eyear."'"; $parsed = ociparse($db_conn, $cmdstr); ociexecute($parsed); $zrows = ocifetchstatement($parsed, $results1); echo $zrows; $cmdstr0="select distinct lane, direction from tms.rawdata tr, calendar c\n where tr.calendar_key=c.calendar_key\n and linkid=".$linkid."\n and direction=".$direction."\n and datex = '".$sday."-".$smonth."-".$syear."'"; $parsed0 = ociparse($db_conn, $cmdstr0); ociexecute($parsed0); $nrows = ocifetchstatement($parsed0, $results); $laneTotal = $nrows; echo $nrows; |
