No, icu90ucme, it's not your query that's the problem. If you refer to the documentation
, you'll see that a call to mysql_query() returns a resource identifier
, which is exactly what you get when you try to echo its value. It doesn't return a string or a number -- you can't just echo it. Remember, if you're having trouble with a particular function, the best first step to solving it is reading the documentation.
Now, in order to make use of the resource, you have to use a function like mysql_fetch_array()
, which will fetch a row from the result set and return it as an array. The examples on that page should be more than enough to get you started.