Re: variable interpolation in mysql queries
| From: | William Fong | Date: | Tue, 26 Feb 2002 23:16:39 +0000 |
| Subject: | Re: variable interpolation in mysql queries | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17317@lists.php.net to get a copy of this message | ||
Would it be faster if all you wanted was one variable, or your SQL statement
only returned on cell?
--
William Fong - wfong@mookandblanchard.com
Phone: 626.968.6424 x210 | Fax: 626.968.6877
Wireless #: 805.490.7732 | Wireless E-mail: 8054907732@mobile.att.net
----- Original Message -----
From: "Bogdan Stancescu" <mgv@fx.ro>
To: <bogdan@lanifex.com>
Cc: "Ryan Snow" <snow@cosmic.utah.edu>; <php-db@lists.php.net>
Sent: Tuesday, February 26, 2002 2:32 PM
Subject: Re: [PHP-DB] variable interpolation in mysql queries
: PS. You should consider using mysql_fetch_row() or at least
: mysql_fetch_array() for perforance reasons.
:
: B
:
: Bogdan Stancescu wrote:
:
: > $query="query";
: > $result=mysql_query($query);
: > $pd=mysql_result($result);
: >
: > Notice the zig-zag - $query is first on the left side, then on the
: > right side, then $result is first on the left side, then on the right
: > side.
: >
: > Bogdan
: >
: > Ryan Snow wrote:
: >
: >> Hi, Im kinda new to this list. Can anyone tell me what is the proper
: >> way to interpolate my php variables into my mysql queries?
: >>
: >> I've been trying $query = "SELECT password FROM users WHERE
: >> login='$login'";
: >>
: >>
: >> then:
: >> mysql_query($result);
: >> $pd = mysql_result($result);
: >>
: >> but I get a message that says: "Supplied Argument is not a valid
: >> MySQL-Link resource"
: >>
: >> any ideas, anyone?
: >>
: >
: >
: >
: >
:
:
:
:
: --
: PHP Database Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
: