im using php with mssql 2000.
i use mssql_fetch_array to get the data from the database.
like :$line = mssql_fetch_array($rs);
but when i try to use $line["FIELDNAME"] to get the field value
i get nothing. if i'll use the offset number: $line[1]
i'll get the correct data.
FIELDNAME is smaller then 30 chars.
appriciate any help or insights
thanks
Guy
mssql problem
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Check what's in the $line array by doing:
Mac
Code: Select all
$line = mssql_fetch_array($rs);
echo '<pre>';
print_r($line);
echo '</pre>';-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
mssql problem
Actually, I have seen this problem when I first tried accessing DB stored procedures via ADO/ASP - field names did not come across, just had to access the recordset fields as
rs.fields(0), rs.fields(1).....etc.
Turns out it was a configuration setting in DB2 that needed to be switched on.
I'll be this is a similar issue with your SequelServer!
Phil J.
rs.fields(0), rs.fields(1).....etc.
Turns out it was a configuration setting in DB2 that needed to be switched on.
I'll be this is a similar issue with your SequelServer!
Phil J.