Hi,
I am using following code to connect with mssql server using php :
for($i = 0;$i<count($postidarray);$i++){
$query1 = "SELECT * FROM tblsi_socialposts where postid = ".$postidarray[$i];
$result1 = odbc_exec($conn,$query1);
$colNumber1 = odbc_num_fields($result1);
}
When I echo $colNumber1 then it returns following output :
4
4
4
4
4
4
4
4
4
4
& so on.
Now you might have noticed that num ber 4 is number of columns and for first few entries there is a gap coming and after some records the sequence is correct. This gap is making my new array index to even numbers for first few entries.
Please give solution for this. Why these blank entries are being shown ?
Thanks.
odbc_exec is returning blank entries in the resource id
Moderator: General Moderators