surreal5335
12-17-2009, 07:28 AM
I am in the middle of tutorial and I ran into this problem, although my code and set up is the same as his to the best of my knowledge, my is giving me this error:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in
Here is the code I am dealing with:
$category_query = "select id, name from categories";
$category_result = mysql_query($category_query);
while($category_row = mysql_fetch_array($category_result)) {
print($category_row['name'].'<br/>');
}
A block of code written just above it is as follows:
$website_query = "select id, url, description, email from websites";
$website_result = mysql_query($website_query);
while($website_row = mysql_fetch_array($website_result)) {
print($website_row['url'].'<br/>');
}
I cant seem to why this one works, but the first one I mentioned doesnt. What should I be looking for?
Thanks a lot for the help
mysql_fetch_array() expects parameter 1 to be resource, boolean given in
Here is the code I am dealing with:
$category_query = "select id, name from categories";
$category_result = mysql_query($category_query);
while($category_row = mysql_fetch_array($category_result)) {
print($category_row['name'].'<br/>');
}
A block of code written just above it is as follows:
$website_query = "select id, url, description, email from websites";
$website_result = mysql_query($website_query);
while($website_row = mysql_fetch_array($website_result)) {
print($website_row['url'].'<br/>');
}
I cant seem to why this one works, but the first one I mentioned doesnt. What should I be looking for?
Thanks a lot for the help