470,590 Members | 2,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,590 developers. It's quick & easy.

printing out an associative array - whats wrong?

Hi Folks,
I have this code segment:

$query = "Select * from Payments order by CustID";
..
.. /* execute the query */
..
if (ora_exec($cursor))
{
$recordset=array();
while (ora_fetch_into($cursor,$recordset,ORA_FETCHINTO_N ULLS|
ORA_FETCHINTO_ASSOC))
{
echo $recordset["CustID"]."<BR>";
echo $recordset["Amount"]."<BR>";
}
}

Gives me the following error
Notice: Undefined index: CustID
Notice: Undefined index: Amount

The table Payments has only CustID and Amount as attributes. is my
usage of the array offset incorrect?

Jul 17 '05 #1
1 1351
try print_r($recordset) or var_dump($recordset) to see all key => value
pairs of the array

micha

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

27 posts views Thread by Abdullah Kauchali | last post: by
6 posts views Thread by mark4asp | last post: by
4 posts views Thread by Robert | last post: by
8 posts views Thread by Derek Basch | last post: by
41 posts views Thread by Rene Nyffenegger | last post: by
2 posts views Thread by Antoine Merieux | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.