try this: $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 ); while($temp=sybase_fetch_array($result)){ $names[] = $temp[name]; }
mfg. harry wiens ""Bob pilly"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi All > > Im new to php and are getting a bit confused about the sybase_fetch_array function (i think that this is the same as mysql_fetch_array?). > > 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); > > > I then try and do something like print $names[0]; > > but it doesnt work. Sorry if this is really basic any help would be greatly appreciated! > > > > --------------------------------- > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php