Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

preparing statements & mysqli
Is it possible to use mysqli's prepare/bind/execute functions,
and be able to use mysqli's normal mysqli_fetch_* functions,
to retrieve data from the prepared statements??
With the provided example, Im getting ->
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result,
object given in C:\Program Files\Apache\.....index.php on line 9
NULL

Granted, $stmt is an object and I need a resource, Im trying to duplicate a
scenario where a db extention can use its fetch functions to work with
its prepare functions.
For example, in the ODBTP (and I think the OCI8) extension, they are
able to
use their fetch functions with prepared statements.

From what Im seeing in the documentation, one is forced to either use
the normal functions,
or *prepared statement* functions.
Im hoping that my assesment is wrong.
Thanks

--
$conn = mysqli_connect('localhost', '***', '***', '***');
$sql = 'SELECT * FROM table where id = ?';
$foo = 'abc';
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, 's', $foo);
mysqli_stmt_execute($stmt);
var_dump(mysqli_fetch_array($stmt));
---

Report this thread to moderator Post Follow-up to this message
Old Post
Gerard Samuel
09-27-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:35 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.