You are here: Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource « PHP « IT news, forums, messages
Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource

Posted by Janet Valade on 10/16/36 11:14

Mark Sargent wrote:

> Hi All,
>
> get the following error when calling data from mysql,
>
> *Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
> result resource in */var/www/html/phpmysqltable.php* on line *36

This means that $result is not a valid result resource. You can
var_dump($result) to see that this is true. It probably contains false.
You get false when there's a problem with your query. If you echo
mysql_error() after the query, you will get more information about what
is wrong.

Janet

> *
> Below are snippets of my code,
>
> Line 22: $result = mysql_query("SELECT product_name,
> product_model_number, product_serial_number FROM Products",$db);
> Line 36: while ($myrow = mysql_fetch_row($result)) {
> printf("<tr><td>%s %s</td><td>%s</td><td>%s
> %</td></tr>\n",
> $myrow[1], $myrow[2], $myrow[3]);
>
> I'm following a webmonkey.com tut for php/mysql.
> http://webmonkey.wired.com/webmonkey/99/21/index3a.html
> Cheers.
>
> Mark Sargent.
>


--
Janet Valade -- janet.valade.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация