Re: Help With Getting Values Please!
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Help With Getting Values Please! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9599@lists.php.net to get a copy of this message | ||
mysql_result() is used when you know the row number of the item you
want to retrive from your table.
mysql_query() is used to get all results from a query, so you can loop
thru an array of them or something.
Russ
On Wed, 23 May 2001 18:47:22 +0200 Johannes Janson
<johannes.janson@gmx.de> wrote:
> Hi,
>
> >$sql2 = "SELECT ServiceDes FROM ServiceTypes WHERE ServiceID =
> $serviceid";
>
> put single quotes around $serviceid.
>
> >$service_type = mysql_result($sql2, 1);
>
> I might be perpetuating the spreading of rumors but I've heard and read
> somewhere
> that mysql_query() is supposed to be better in the performance. Perhaps
> someone
> else could clear this point for me thus stopping the rumors.
>
> Cheers
> Johannes
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
t: +44 (0)1223 363271 x 2331
www.theruss.com
#-------------------------------------------------------#