Re: Adding records to a MySql database

From: Date: Fri, 17 Aug 2001 23:52:30 +0000
Subject: Re: Adding records to a MySql database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63262@lists.php.net to get a copy of this message
Thanks ----- Original Message ----- From: "ERISEN, Mehmet Kamil" <erisen@yahoo.com> To: "Dave.O" <Dave.O@tinyonline.co.uk>; "Martín_Marqués" <martin@bugs.unl.edu.ar> Cc: <php-general@lists.php.net> Sent: Saturday, August 18, 2001 12:42 AM Subject: Re: [PHP] Adding records to a MySql database > Here is how this is done: > > $sql = "insert into employees > values ('10','John','Smith','Engineer') "; > $result = mysql_query($sql) or die ('Insert failed'); > > with php, you can execute any SQL statement as long as you > have access... > > to update a table > > $sql = "update employees > set job = 'Chief Engineer' > where employee_id = '10' "; > $result = mysql_query($sql) or die ('Update failed'); > > hope this helps, > ultrAslan > > --- "Dave.O" <Dave.O@tinyonline.co.uk> wrote: > > I was looking for the command something like mysql_insert > > or something, just > > found dba_insert() is this it ?!? > > > > ----- Original Message ----- > > From: "Martín Marqués" <martin@bugs.unl.edu.ar> > > To: "Dave.O" <Dave.O@tinyonline.co.uk> > > Cc: <php-general@lists.php.net> > > Sent: Saturday, August 18, 2001 12:23 AM > > Subject: Re: [PHP] Adding records to a MySql database > > > > > > > On Vie 17 Ago 2001 20:14, Dave.O wrote: > > > > I have read the documentation already. > > > > > > > > I am trying to create a directory, which information > > can be added and > > > > maintained through a the web browser. I thought that > > using a MySql > > > > database would be a good idea rather than writing it > > all to a file. You > > > > saying that MySql is a waste of time for this ? > > > > > > > > I thought that PHP can be used to add records etc and > > query databases > > for > > > > this > > > > > > You said that all you found were functions to query > > information. Thats all > > > you need with an SQL database. > > > The main SQL query commands are: SELECT, UPDATE, DELETE > > and INSERT. With > > > those 4 comands you can read, insert and modify (also > > delete) the > > information > > > on your database. > > > > > > Hope you understand know. > > > > > > Saludos... :-) > > > > > > -- > > > Porqué usar una base de datos relacional cualquiera, > > > si podés usar PostgreSQL? > > > > > > ----------------------------------------------------------------- > > > Martín Marqués | > > mmarques@unl.edu.ar > > > Programador, Administrador, DBA | Centro de > > Telematica > > > Universidad Nacional > > > del Litoral > > > > > > ----------------------------------------------------------------- > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: > > php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: > > php-general-help@lists.php.net > > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: > > php-general-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > ===== > Mehmet Erisen > http://www.erisen.com > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#63262) next »