Hello,
This is a reply to an e-mail that you wrote on Thu, 10 Jul 2003 at 15:30, lines prefixed by '>' were originally written by you. > If i have a valid sql query that returns three the records > 'john','jack' and 'mary' and i want to put that into an array where > array[0]->john,array[1]->jack etc how do i do this? Im trying to use > sybase_fetch_array as follows: > $query = "select name from names (where age <'23'')"; > $numero= sybase_connect("database" , "user" , "password" ) > or die ("Unable to connect to database server"); > $result=sybase_query($query,$numero ); > $names=sybase_fetch_array($result); sybase_fetch_array will fetch one row of the result, if you want all three rows in one array you will need something like this... $allnames = array(); while($thisname = sybase_fetch_row($result)){ $allnames[] = $thisname[0]; } I have never used the sybase db functions though so I may be incorrect. All the best, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php