Sponsored Content
Full Discussion: A Sad Day for Smarty Jones!
The Lounge What is on Your Mind? A Sad Day for Smarty Jones! Post 51998 by iKwak on Monday 7th of June 2004 08:48:33 PM
Old 06-07-2004
I just watched my first horse racing when Smarty Jones appeared. So much media attention on that horse. Smilie
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to find previous month last day minus one day timestamp

Hi All, I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this. My Requirment is as below: Input for me will be 2000909(YYYYMM) I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies

2. What is on Your Mind?

Does modernity make you sad?

One more "on my mind" question ('cause it's constantly on my mind): does modern technology style make you sad and wishing PCs were like they used to be in 90's? I mean we had awesome UIs like motif, win3.1, warp3/4, cde, etc... HDDs used to load with sound. Web used to be a text on a white... (7 Replies)
Discussion started by: guest115
7 Replies

3. AIX

Sad me - or Happy me? Undecided re: AIX 7.2

AIX 7.2 - needs POWER7 or later With AIX 6.1 it was POWER4 or later - then I was "Happy Me!" because I already had a POWER4 system. With AIX 7.2 - for now I am "sad me" because I do not have a POWER7. However, next week I am going to be speaking at the POWER TechU in Cannes (look me up if you... (8 Replies)
Discussion started by: MichaelFelt
8 Replies
DB2_FETCH_ARRAY(3)							 1							DB2_FETCH_ARRAY(3)

db2_fetch_array - Returns an array, indexed by column position, representing a row in a result set

SYNOPSIS
array db2_fetch_array (resource $stmt, [int $row_number = -1]) DESCRIPTION
Returns an array, indexed by column position, representing a row in a result set. The columns are 0-indexed. PARAMETERS
o $stmt - A valid stmt resource containing a result set. o $row_number - Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a forward-only cursor. RETURN VALUES
Returns a 0-indexed array with column values indexed by the column position representing the next or requested row in the result set. Returns FALSE if there are no rows left in the result set, or if the row requested by $row_number does not exist in the result set. EXAMPLES
Example #1 Iterating through a forward-only cursor If you call db2_fetch_array(3) without a specific row number, it automatically retrieves the next row in the result set. <?php $sql = "SELECT id, name, breed, weight FROM animals ORDER BY breed"; $stmt = db2_prepare($conn, $sql); $result = db2_execute($stmt); while ($row = db2_fetch_array($stmt)) { printf ("%-5d %-16s %-32s %10s ", $row[0], $row[1], $row[2], $row[3]); } ?> The above example will output: 0 Pook cat 3.20 5 Rickety Ride goat 9.70 2 Smarty horse 350.00 Example #2 Retrieving specific rows with db2_fetch_array(3) from a scrollable cursor If your result set uses a scrollable cursor, you can call db2_fetch_array(3) with a specific row number. The following example retrieves every other row in the result set, starting with the second row. <?php $sql = "SELECT id, name, breed, weight FROM animals ORDER BY breed"; $result = db2_exec($stmt, $sql, array('cursor' => DB2_SCROLLABLE)); $i=2; while ($row = db2_fetch_array($result, $i)) { printf ("%-5d %-16s %-32s %10s ", $row[0], $row[1], $row[2], $row[3]); $i = $i + 2; } ?> The above example will output: 0 Pook cat 3.20 5 Rickety Ride goat 9.70 2 Smarty horse 350.00 SEE ALSO
db2_fetch_assoc(3), db2_fetch_both(3), db2_fetch_object(3), db2_fetch_row(3), db2_result(3). PHP Documentation Group DB2_FETCH_ARRAY(3)
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy