Re: Getting Closer
| From: | (Richard Lynch) | Date: | Tue, 04 Jul 2000 01:36:43 +0000 |
| Subject: | Re: Getting Closer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4631@lists.php.net to get a copy of this message | ||
In article <4.3.0.20000629120320.00b37d90@127.0.0.1>, beno@cnw.com (Ben
Ocean) wrote:
> Hi;
> I'm making progress! I have a problem...
> if ($colorz != 9) {
> $result = mysql_query("SELECT id, name, color FROM horse ORDER BY name");
> $total_rows = mysql_numrows($result); $counter = 0;
> while($counter < $total_rows):
> $id = mysql_result($result,$counter,"id"); echo "\n";
> if ($row[$counter]->color == $colorz) {
> echo mysql_result($result,$counter,"name");
> echo "<br>";
> }
> $counter = $counter + 1;
> endwhile;
>
> Everything seems to be working here *except* this line:
> if ($row[$counter]->color == $colorz) {
You probably need {$row[$counter]}->color...
Except I'm not at all sure what $row is from what you have here...
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)