Reply to Re: Select/Join query help (dropdown box?)

Your name:

Reply:


Posted by Geoff Berrow on 07/09/05 01:49

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

>Geoff:
>I need a select box just so we have the ability to edit this value
>easily if neccessary. I guess it just makes it easier than typing in
>the ID for each staff member, when we have around 30..

Read my reply again. The query you are running seems to return one row
only. To get a drop down box of all staff members you'll have to run
/another/ query on the staff members table.
>
>As for the code: I used the $row2[3] and $row2[4] values, they worked
>great, displaying the $author value for the correct review. However,
>when I uncommented a part of my code, they became blank. The code I
>uncommented? That which loads the other values into the form.
>
>For example:
>http://www.scenepointblank.com/matt/dev/reviews/reviewedit.php?id=240
>
>If I comment out those lines, we get this:
>http://www.scenepointblank.com/matt/dev/reviews/reviewedit_2.php?id=240
>
>This is the code I'm commenting out:
>
>$i=0;

Why do we have a loop here? It's still only one record isn't it?
>while ($i < $num) {
>
>/*$Band_Name=mysql_result($mattresult,$i,"Band_Name");
>$Record_Name=mysql_result($mattresult,$i,"Record_Name");
>$Review=mysql_result($mattresult,$i,"Review");
>$Staff_Name=mysql_result($mattresult,$i,"Staff_Name");
>$Staff_id=mysql_result($mattresult,$i,"Staff_id");
>$Score=mysql_result($mattresult,$i,"Score");
>$Cover_Image=mysql_result($mattresult,$i,"Cover_Image");
>$Record_Label=mysql_result($mattresult,$i,"Record_Label");
>$Band_Site_URL=mysql_result($mattresult,$i,"Band_Site_URL");
>*/
>
>$i++;
>}
>
>Without that, none of the $variables load in the form.
Why do you think they would?

>What am I doing
>wrong?

It seems a very complicated way of doing it
$myrow=mysql_fetch_array($result) will fetch an associative array of
variables in the form $myrow['Band_Name'], $myrow['Record_Name'] and so
on. You can then use these to populate your form
--
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/

[Back to original 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

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