ShadyCoco Posted September 4, 2011 Posted September 4, 2011 Hey, I've been working on a mail script and keep coming accross little errors. I've fixed most of them but now I'm getting this one: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\***\mail.php on line 39 I don't understand because my mysql_fetch_array() is bringing resources :/ If anyone can point me the right way i'd be very happy :) Heres the code: $_MailRun = mysql_query("SELECT * from `mails` ORDER BY `time` DESC"); //this is line 39 while ($_Mails = mysql_fetch_array($_MailRun, MYSQL_ASSOC)) { if ($_Mails['to'] == $_USER['id']) { $_MailsFrom = $_USERMAILFROMcol['username']; $subject = ($_Mails['subj'] == "") ? "No Subject" : $_Mails['subj']; if ($_Mails['seen']=="1") { $_MailSeen="No"; } else { $_MailSeen="Yes"; } echo " <tr> <td colspan='25%'>".date(F." ".d.", ".Y." ".g.":".i.":".sa,$_Mails['time'])."</td> <td width='25%'><a href='mail.php?mail=read'>".$subject."</a></td> <td width='25%'>".$_MailsFrom['username']."</td> <td width='25%'>".$_MailSeen."</td> <td><a href='mails.php?mail=delete'>Delete</a></td> </tr> "; } } ?> Quote
ShadyCoco Posted September 4, 2011 Author Posted September 4, 2011 Fixed as I posted it seen the problem - Sorry :/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.