<snip>
select id, name from customer
redim custarray(recordcount,2)
i = 0
while not eof
    custarray(i,0) = id;
    custarray(i,1) = name;
    i = i+1;
    movenext
wend
</snip>

Not sure what kind of db you are using but I put this together using
postgresql using the manual. So this is untested.

$conn = pg_connect("host=localhost dbname=whatever");
$result = pg_exec($conn, "select id, name from customer");
$i = 0;
while ($row = pg_fetch_array($result))
{
      $custarray[$i][0] = $row["id"];
      $custarray[$i][1] = $row["name"];
     $i++;
} 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to