note 110505 rejected from function.odbc-fetch-array by aharvey

From: Date: Tue, 30 Oct 2012 06:04:03 +0000
Subject: note 110505 rejected from function.odbc-fetch-array by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191601@lists.php.net to get a copy of this message
Note Submitter: renigade1 at can-d dot net ---- Hey all... I am having issues with fetching rows in desc order... code below <?PHP // connect to a DSN "myDSN" $conn1 = odbc_connect('dbn','uid','pass'); // the SQL statement that will query the database $sqlcbn="select * from tablename where fieldkey=" .$row["id"]. " order by id desc"; // perform the query $resul1t=odbc_exec($conn1, $sqlcbn); // Check if there are records if (odbc_num_rows($resul1t) != 0) { // fetch tha data from the database while ($r1ow = odbc_fetch_row($resul1t)) {$contactnotes = $r1ow["fieldname"];} }else{$contactnotes=$row["fieldname"];} ?> can any one tell me what I am doing wrong??

« previous php.notes (#191601) next »