I am using this select
$sql1=" SELECT pole FROM Table1 WHERE dva='d'";
and it should return all for elements from the table ( because in the field “dva” they all have ‘d’) and using this function to do it
while( $row = sqlsrv_fetch_array($st)) {
// echo $row[0]."<br />";
print_r($row);
}
here is the result I get, it starts from the second row and so on…
Array (
[0] => testxz2
[pole] => testxz2
)
Array (
[0] => some data
[pole] => some data
)
Array (
[0] => some data
[pole] => some data
)
before I tried this and this got me the row number 1 and the other rows I got from the upper code,
while($pole=sqlsrv_get_field($st,0)){echo $pole;}
Can u put the whole code before the fetch call
JUST edit the part before:
I think here is the error because you are fetching the first element and the second while u use to fetch all rows is missing the first because is already fetch… Try to use your
whileloop before the first fetch..