>
To: <[EMAIL PROTECTED]>
Sent: Friday, 04 July, 2003 12:08
Subject: [PHP-DB] SELECT question
What is the syntax for running a SELECT command with multiple conditions?
Example SELECT * FROM members WHERE user_id='$u_id' AND email='$email';
Thanks
--
PHP Data
What is the syntax for running a SELECT command with multiple conditions?
Example SELECT * FROM members WHERE user_id='$u_id' AND email='$email';
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Aug 21, 2001 at 02:21:49PM +0100, Scott Chapman wrote:
> Hi,
>
> When doing a select of the form
>
> SELECT blah FROM blah WHERE blah=blah AND blah=blah;
>
> is there any way of doing it with an OR ie;-
>
> SELECT blah FROM blah WHERE blah=blah OR blah=blah;
>
> or any other way in w
Hi,
When doing a select of the form
SELECT blah FROM blah WHERE blah=blah AND blah=blah;
is there any way of doing it with an OR ie;-
SELECT blah FROM blah WHERE blah=blah OR blah=blah;
or any other way in which I could do something similar?
thanks in advance
lee
--
PHP Database Mailin
Nick,
Use the group by function:
SELECT items.itemId, description, link, sum(qty) AS total_qty,
sum(price) AS total_price FROM carts, items
WHERE carts.custId = '$custId' AND items.itemId = carts.itemId
GROUP BY items.itemId, description, link
You'll have to change the reference to the followi
If you have a shopping cart why would you want them to add the same
item in there twice... why not just have them update their quantity to 5?
At 11:10 PM 5/16/01, you wrote:
>>Hi All,
>>
>>I'm building a standard shopping cart style e-commerce site using PHP and
>>MySQL running on Apache.
>
>Hi All,
>
>I'm building a standard shopping cart style e-commerce site using
>PHP and MySQL running on Apache.
>
>I store my users' cart info in this table:
>
>++--+--+-+-+---+ |
>| Field | Type | Null | Key | Default | Extra | +
>+---
Hi All,
I'm building a standard shopping cart style e-commerce site using PHP
and MySQL running on Apache.
I store my users' cart info in this table:
++--+--+-+-+---+
|
| Field | Type | Null | Key | Default | Extra |
+
++--