You are here: Re: Select/Join query help (dropdown box?) « PHP Programming Language « IT news, forums, messages
Re: Select/Join query help (dropdown box?)

Posted by Geoff Berrow on 07/09/05 17:35

I noticed that Message-ID:
<1120918876.965985.276430@f14g2000cwb.googlegroups.com> from
guitarromantic@gmail.com contained the following:

>I'm sorry, I didn't follow. What did you mean by:
>
>"Let's assume you have defined a variable $Staff_id_db from your first
>query"?

Your first query:

$query = "SELECT Band_Name, Record_Name, Review, Staff_Name, Staff_id,
Score, Cover_Image, Record_Label, Band_Site_URL
FROM review_test INNER JOIN staff ON Reviewer_Name = staff.Staff_id
WHERE id='$id'";
$result = mysql_query($query) or die('Error : ' . mysql_error());

if you do:
$myrow=mysql_fetch assoc($result);

then $myrow['Staff_id'] will contain the staff id of the person who
wrote the review, no?

Compare that with the results from the query of the staff table to
determine which should be selected in the select box

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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