Re: writing to mysql using php
| From: | Scott Hurring | Date: | Mon, 09 Dec 2002 23:50:31 +0000 |
| Subject: | Re: writing to mysql using php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127576@lists.php.net to get a copy of this message | ||
You're limited to one action per statement, not one record.
Using "UPDATE ... WHERE", you can update any number of rows
with a single SQL statement.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Hugh Danaher" <hdanaher@earthlink.net> wrote in message
news:001301c29fc8$b20f06c0$0100a8c0@win95...
> Shams,
> Most database actions you want your user to do should be limited to them
> writing to one record and/or updating that one record. If instead you want
> to update information on several records, then you'd need a statement like:
> $table="your_table_name";
> $query=mysql_query("update $table set column_name='what ever' where
> other_column_name='something else'");
> Hope this helps,
> Hugh
>
> ----- Original Message -----
> From: "Enrique Garcia Briones" <xxiengb@csxxi.sepc.edu.mx>
> To: "Shams" <shamskhanmalik@hotmail.com>; <php-general@lists.php.net>
> Sent: Monday, December 09, 2002 12:10 PM
> Subject: RE: [PHP] writing to mysql using php
>
>
> > If there were no more replies... you can use it by means of BUCLES, isn't
> > it?
> >
> > BR, Enrique
> >
> > -----Mensaje original-----
> > De: Shams [mailto:shamskhanmalik@hotmail.com]
> > Enviado el: Martes, 03 de Diciembre de 2002 04:32 a.m.
> > Para: php-general@lists.php.net
> > Asunto: [PHP] writing to mysql using php
> >
> >
> > Hi,
> >
> > I'm relatively new to PHP and mySQL.
> >
> > I currently have a simple table created within a MySQL database. And I
> have
> > a php script that connects to the database, presents a form for the user
> to
> > fill in, and then writes that record to the table.
> >
> > Instead... is it possible, to write to multiple records at once using a
> > tabular view rather than one record at a time with a columnar view ?
> >
> > Many Thanks,
> >
> > Shams
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>