You are here: Re: [PHP] Inner Join or 2nd Query...? « PHP « IT news, forums, messages
Re: [PHP] Inner Join or 2nd Query...?

Posted by Richard Lynch on 05/13/05 02:47

On Thu, May 12, 2005 12:17 am, Mark Sargent said:
> Hi All,
>
> ok, this revised code produces the error below,
>
> <?php

You took out the mysql_connect completely???

Don't do that.

> mysql_select_db("status",$db);
> $maker_result = mysql_query("SELECT Makers.maker_id Makers.maker_detail
> FROM Makers",$db);

if (!$maker_result) die(mysql_error());

> $maker_num = mysql_num_rows($maker_result); //Line 40
> ?>
> <select name="slct_maker">
> <?php
> for ($i=0; $i<$maker_num; $i++){
> $maker_myrow=mysql_fetch_array($maker_result);
> $maker=mysql_result($maker_result,$i,"maker_detail");
> $maker_id=mysql_result($maker_result,$i,"maker_id");
> echo "<option value=\"$maker_id\">$maker</option><br>";
> }
> ?>
> </select>
>
>
> *Warning*: mysql_num_rows(): supplied argument is not a valid MySQL
> result resource in */var/www/html/products.php* on line *40
>
> Cheers.
>
> Mark Sargent.
> *
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Like Music?
http://l-i-e.com/artists.htm

 

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

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