× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've been wondering about i5_ versus db2_ and still have no answer.

i5_fetch_array sounds just like db2_fetch_assoc
--
Sean Porterfield
________________________________________
From: Kelly Cookson

Here's a simple db2_ example. Suppose you wanted to read a file called
MYLIB/MEMBERS. The file has three fields: FNAME, LNAME, and PHONE.

//Connect to the database
$conn = db2_connect("", "", "")
or die(db2_conn_errormsg());

//Prepare the SQL Query for execution
$query = "SELECT * FROM MYLIB.MEMBERS";
$statement = db2_prepare($conn, $query)
or die(db2_stmt_errormsg());

//Execute the query
db2_execute($statement)
or die(db2_stmt_errormsg());

//Retrieve the results
while ($row = db2_fetch_assoc($statement))
{
$first_name = $row["FNAME"];
$last_name = $row["LNAME"];
$phone_number = $row["PHONE"];

//process or display the data

}

//Close the connection
db2_close($conn);

Hope that helps a little.
Kelly

This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged. If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited. Thank you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.