Menu

Returned row indexes

2003-05-08
2003-05-08
  • Nobody/Anonymous

    Is there a way to make the $row use the column names from the table instead of the index?    e.g.:

    $row = sql_fetch_row($res_id);
    $_SESSION["logged_in"] = "true";
    $_SESSION["username"] = $username;

    //This line doesn't work
    $_SESSION["cust_id"] = $row["cust_id"];

    //This line does
    echo "cust id is ".$row["0"];

    Thanks! I'm about to start a major project using SQL_AL as my database abstraction layer.

    loydb

     
    • Nobody/Anonymous

      Doh, just notice sql_fetch_array does this.

      Never mind :)

      loydb

       

Log in to post a comment.

MongoDB Logo MongoDB