Re: [PHP] Help Please

2002-12-10 Thread BABA Yoshihiko
SpiderWebb wrote:

From: "SpiderWebb" <[EMAIL PROTECTED]>
Subject: Help nedded
Date: 09 December 2002 16:46

I dont know if this is possible in PHP (Newbie) im working on a project
where each product has 3 diffierent prices depending on the amount sold so
say for example 1- 100 price A 101-299 price B and above 300 Price C.  What
I need to be able to do is increment an mysql database field each time an
item is sold then look at that field to decide which price variable to write
to the price field of the database. Could someone point me in the right
direction where I could solve this or to someone who could

Thanks in advance.
Spiderwebb


This seems a matter of database design.  For simple solution, use COUNT 
in SQL.  But having a record for each item would probably exceed the 
limit of either harddisc or database one day.


--
BABA Yoshihiko


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help Please

2002-12-10 Thread BABA Yoshihiko
Forget my previous advice. I'd misunderstood it.

BABA Yoshihiko wrote:


This seems a matter of database design.  For simple solution, use COUNT 
in SQL.  But having a record for each item would probably exceed the 
limit of either harddisc or database one day.



--
BABA Yoshihiko


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and MySQL

2002-12-11 Thread BABA Yoshihiko
Jason Wong wrote:

Not sure why you're escaping the single quote. It's unnecessary -- and I 
suspect you mis-escaped $select as well. Any you can use this format, which 
IMHO, is a lot easier on the eyes:

$sql = "INSERT INTO `guest` 
SET `title` = '$title',
`first_name` = '$first_name',
...,
...,
`last_visit` = NOW()";


Can you use SET with INSERT INTO?  Is it MySQL grammer?


--
BABA Yoshihiko


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php