iR00T Posted May 7, 2008 Posted May 7, 2008 ok i add'd it right upload warnings.php did that put it in users this $w=$db->query("SELECT * FROM warnings WHERE user={$r['userid']}");print "<font color=red>Warnings: ".$db->num_rows($w)." </font>";if($ir['user_level'] > 1){print "|| [<a href=warnings.php?action=index&user={$r['userid']}>Manage</a>]";} with days old above it still gave me a error on the viewusers when i click on my game wtf could someone give me a working warnings mod???? pm me plz Quote
Guest Anonymous Posted May 7, 2008 Posted May 7, 2008 Re: advanced warning system???? Do tell us what the error is ... I can't quite my crystal ball ;) $w=$db->query("SELECT * FROM warnings WHERE user={$r['userid']}"); print "<font color=red>Warnings: ".$db->num_rows($w)." </font>"; if($ir['user_level'] > 1) print "|| [<a href=warnings.php?action=index&user={$r['userid']}>Manage</a>]"; Quote
Haunted Dawg Posted May 7, 2008 Posted May 7, 2008 Re: advanced warning system???? Nyna remmember quite a few weeks ago you said you do not require quotation's for numbers? Well recently i discovered in some places you need them. $fetch_data = mysql_query("SELECT * FROM warnings WHERE user='".$r['userid']."'") or die(mysql_error()); echo '<font color="red">[b]Warnings:[/b] '.mysql_num_rows($fetch_data).'</font>'; if($ir['user_level'] > 1) { echo ' ||[url="warning.php?action=index&user='.$r['userid'].'"]Managae[/url]]'; } Quote
Guest Anonymous Posted May 7, 2008 Posted May 7, 2008 Re: advanced warning system???? Sorry to dissapoint you there old bean ... wrong again... You do not need the the quotation marks around that. Had you been paying a little more attention, you may have noticed a security bulletin which although currently aimed at Oracle users, may have some future bearing on MySQL users regarding the quoting of numeric values. Quote
Haunted Dawg Posted May 7, 2008 Posted May 7, 2008 Re: advanced warning system???? Well i dont know i read this one forum and it says that quotation marks are needed in some occasions, with numbers. Well since you said it was not needed, i went and did a little test. By using some thing like $fetch_data = mysql_query("SELECT * FROM users WHERE location={$r['location']}") or die(mysql_error()); It gave me an error. So i tried this $fetch_data = mysql_query("SELECT * FROM users WHERE location=$r['location']") or die(mysql_error()); Gave me another error. So eventualy i just went with my code $fetch_data = mysql_query("SELECT * FROM users WHERE location='".$r['location']."'") or die(mysql_error()); And it never gave me no error. Maybe on your machine quotation marks are not needed or your php version or what so ever, but on my host it is required in some occasions. Quote
Guest Anonymous Posted May 7, 2008 Posted May 7, 2008 Re: advanced warning system???? LOL Ho well, good luck with that host then. Quote
Magictallguy Posted May 9, 2008 Posted May 9, 2008 Re: advanced warning system???? And to get us back on topic... Joker, don't throw random code at us! Give us around 5-10 lines of code above and below what it is you want. Also - I have fixed this for him. But yea - in future let us know what it is that's causing the error too! Quote
iR00T Posted June 19, 2008 Author Posted June 19, 2008 Re: advanced warning system???? yes sir - XD - lol i'll try and remember it next time Magic 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.