[PHP-DB] Multiple query execution

2005-09-03 Thread Alvaro Cobo
Hi guys: I need to execute two insert/update queries within a single statement string from a PHP application, but it keeps giving me an error. For example, I have a listbox which has to insert or update two tables whithin the same submit action: INSERT INTO tbl_ISperson(NamePerson, Country)

[PHP-DB] begginer question

2005-09-03 Thread ziv gabel
Hi everyone I just need something that I believe is very simple only I can't find an answer for it anywhere I have a database that each row has a machine, its serial, the customer and other details. The problem is that I have customers with more than one machine and I need to query for all the

RE: [PHP-DB] begginer question

2005-09-03 Thread Miguel Guirao
First, you need to normalize your DB, maybe going up to the Third Normal Form will give you a good DB design. Second, there is a SQL parameter that let's you display only one record from many duplicated records, equal records, I guess it is UNIQUE. -Original Message- From: ziv gabel

Re: [PHP-DB] begginer question

2005-09-03 Thread Micah Stevens
Select * from tablename group by customername order by serialnum DESC; or select distinct * from tablename order by serialnum DESC; On Saturday 03 September 2005 12:34 pm, ziv gabel wrote: Hi everyone I just need something that I believe is very simple only I can't find an answer for it

RE: [PHP-DB] begginer question

2005-09-03 Thread Bastien Koert
select max(serial_Num) from table where... bastien From: ziv gabel [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] begginer question Date: Sat, 03 Sep 2005 21:34:31 +0200 Hi everyone I just need something that I believe is very simple only I can't find an answer for it anywhere

RE: [PHP-DB] begginer question

2005-09-03 Thread Bastien Koert
whoops forget the group by clause select max(serial) from table where clause group by customer_id order by... bastien From: ziv gabel [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] begginer question Date: Sat, 03 Sep 2005 21:34:31 +0200 Hi everyone I just need something that

[PHP-DB] RE: Really dumb Question - Select Many Display Records

2005-09-03 Thread Peter Justus
Hi All Hoping somebody can help me out here, fairly new to PHP and MYSQL, I won't waffle on but, but here is my problem! I have a database with four tables in it, I would like to call the information from the table into a select menu, once the user has clicked on an item in the select menu, it

RE: [PHP-DB] RE: Really dumb Question - Select Many Display Records

2005-09-03 Thread ziv gabel
If you just need to know how to make the page refresh when you select an item then on the select tab you add (if I remember right) onchange:document.submit; (you can check www.w3schools.com if that's not working) And if you just want to make the select from the db then its Select distinct column