I am writing a login script using cookie and DBI to connect to a mysql database and I need to run a query like:
"SELECT username from users" and have it return all the usernames in preferably an array so I can do something like: foreach $names (@results){ if ($names eq $username){ check the password and set the cookie } else{ say that username not found } problem is that I can find a way to fetch all the rows. I have been using @results = fetchrow_array but that of course only gets one row. I don't understand arrayrefs at all so what can i do? _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx