printing out an associative array - whats wrong?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cricketunes@yahoo.com

    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($curs or))
    {
    $recordset=arra y();
    while (ora_fetch_into ($cursor,$recor dset,ORA_FETCHI NTO_NULLS|
    ORA_FETCHINTO_A SSOC))
    {
    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?

  • micha

    #2
    Re: printing out an associative array - whats wrong?

    try print_r($record set) or var_dump($recor dset) to see all key => value
    pairs of the array

    micha

    Comment

    Working...