note 28678 added to function.odbc-result
| From: | fate at doityourself dot com | Date: | Mon, 20 Jan 2003 15:14:27 +0000 |
| Subject: | note 28678 added to function.odbc-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42433@lists.php.net to get a copy of this message | ||
if you want to quickly change a website from odbc- to mysql-data-access, you could use a simple
function like this one:
function myresult ($cur,$nr) {
return mysql_result($cur,0,mysql_field_name($cur,$nr-1));
}
and just do a global replace from "odbc_result" to "myresult".
beware, you should only use this if you don't care too much about performance, as this will
start a query for every field you request - the better way is of course using mysql_fetch_row!
--
http://www.php.net/manual/en/function.odbc-result.php
http://master.php.net/manage/user-notes.php?action=edit+28678
http://master.php.net/manage/user-notes.php?action=delete+28678
http://master.php.net/manage/user-notes.php?action=reject+28678