Help Me PLEASE :(

Ok this is really pissing me off. I have a script to display records
[PHP]<?
mysql_connect("localhost","","");

mysql_select_db("");

$result = mysql_query("SELECT * from 'tutorials' limit 6 ORDER by id WHERE 'check' = '2' ");

while($r=mysql_fetch_array($result))
{

$title=$r["title"];
$url=$r["url"];
$img=$r["img"];
$date_add=$r["date_add"];
$cat=$r["cat"];
$des=$r["des"];

echo 'blah';
}
?>[/PHP]

Now i don't see no problem with that and i keep getting this error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\easyphp1-7\www\urftutorials\db\index_db.php on line 8

This might be a n00b question but i can't see any thing wrong wit the code so can any of you see it? b4 you ask the MySql is fine i'm sure
Free MySpace Layouts- Coming soon
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon

Haha i should really do some work so i can remove all the coming soon's

Comments

  • PythonPython Forum Leader The Royal RAM
    well the first thing I can see is that you are using ' around the word tutorials which is the table name...im not sure if that's ok but i dont use them. same goes for the word check. with the number 2 in your query dont put it in ' and ' ...i think

    apart from that make sure that there is something in the database :)

    The Royal Ram

  • martian2k4martian2k4 Llama Hunter Moderator
    Thanc i manage to sort it wit some help from the people from php freaks but thanx any way and yes py they were some of the things that were wrong with it
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • PythonPython Forum Leader The Royal RAM
    ahh rite ok cool

    The Royal Ram

Sign In or Register to comment.