note 110505 added to function.odbc-fetch-array
| From: | renigade1 at can-d dot net | Date: | Tue, 30 Oct 2012 03:08:10 +0000 |
| Subject: | note 110505 added to function.odbc-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191592@lists.php.net to get a copy of this message | ||
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??
----
Server IP: 69.147.83.199
Probable Submitter: 24.12.21.43
----
Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php
Edit -- https://master.php.net/note/edit/110505
Del: integrated -- https://master.php.net/note/delete/110505/integrated
Del: useless -- https://master.php.net/note/delete/110505/useless
Del: bad code -- https://master.php.net/note/delete/110505/bad+code
Del: spam -- https://master.php.net/note/delete/110505/spam
Del: non-english -- https://master.php.net/note/delete/110505/non-english
Del: in docs -- https://master.php.net/note/delete/110505/in+docs
Del: other reasons-- https://master.php.net/note/delete/110505
Reject -- https://master.php.net/note/reject/110505
Search -- https://master.php.net/manage/user-notes.php