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" <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]>
> To: "Dave.O" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> 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 |
> [EMAIL PROTECTED]
> > Programador, Administrador, DBA | Centro de
> Telematica
> > Universidad Nacional
> > del Litoral
> >
>
-----------------------------------------------------------------
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
=====
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]