PDA

Click to See Complete Forum and Search --> : odbc_fetch_row($...))


atomix
Dec 5th, 2003, 01:23 PM
...
while (odbc_fetch_row($rec)) {
$str1 = $str1.odbc_result($rec, "Id");
}

while (odbc_fetch_row($rec)) {
$str2 = $str2.odbc_result($rec, "Id");
}


$str1 = "1234", and is correct!
$str2 = ""

How can I use more times odbc_fetch_row() for the same recordset (to have $str2 = "1234" too) ?

CornedBee
Dec 7th, 2003, 04:08 PM
Why would you want to? It's slow, making so many roundtrips to the database, even if only for fetching data. Just do str2 = str1.

There might be a reset function.