AW: [PHP-DB] ODBC Connection Problem
| From: | Michael Rudel | Date: | Tue, 28 Nov 2000 08:51:08 +0000 |
| Subject: | AW: [PHP-DB] ODBC Connection Problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4800@lists.php.net to get a copy of this message | ||
Hi Duane !!
Sure, you have to pass the Array by reference, not by value, like this:
odbc_fetch_into( odbc_exec( $dboConnect, $strSQLString ),
&$qrySQLString );
The '&'-Operator passes the Array (or any other variable) by refference,
just
like C/C++ and the like.
Hope 'tll help!
Greetinx,
Mike
(Germany)
-----Ursprüngliche Nachricht-----
Von: Duane Boudreau [mailto:dboudreau@ektron.com]
Gesendet: Montag, 27. November 2000 19:45
An: php-db@lists.php.net
Betreff: [PHP-DB] ODBC Connection Problem
Hi All,
Let me start by letting you know I have all of two days experience so far
with PHP. (Been working with ColdFusion for almost 5 though). Anyway, I'm
trying to make a serialize the results of a database query into a WDDX
packet but I get the following error:
Warning: Array not passed by reference in call to odbc_fetch_into() in
c:\inetpub\wwwroot\ewebeditpro\php\index.php on line 19 (which is actually
the line that starts with odbc_fetch_into)
What I am doing something wrong. Please help.
Here is the code:
<?php
$strSQLString = "SELECT * FROM images";
$dboConnect = odbc_connect( $gstrDataSourceName, "", "" );
$qrySQLString = "";
odbc_fetch_into(odbc_exec( $dboConnect, $strSQLString ),
$qrySQLString );
odbc_close( $dboConnect );
$WDDXSQLString = wddx_serialize_vars($qrySQLString);
?>
TIA,
Duane Boudreau
Director of Web Technologies
Ektron, Inc.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net