Re: [PHP-DB] SELECT question

2003-07-07 Thread Becoming Digital
> 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

[PHP-DB] SELECT question

2003-07-04 Thread Artoo
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

Re: [PHP-DB] select question

2001-08-21 Thread
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

[PHP-DB] select question

2001-08-21 Thread Scott Chapman
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

[PHP-DB] SELECT question

2001-05-17 Thread Dan Fitzpatrick
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

Re: [PHP-DB] SELECT question

2001-05-17 Thread Rick St Jean
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. >

Re: [PHP-DB] SELECT question

2001-05-17 Thread Bob Hall
>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 | + >+---

[PHP-DB] SELECT question

2001-05-16 Thread Nicholas W. Miller
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 | + ++--