Re: MySQL and PHP
| From: | James Atkinson | Date: | Fri, 10 Nov 2000 20:00:14 +0000 |
| Subject: | Re: MySQL and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24702@lists.php.net to get a copy of this message | ||
On Fri, 10 Nov 2000, jero@jeroinc.net wrote:
> Hello,
> I can access a MySQL database without a problem with PHP. I can retrieve
>
> information. I was wondering though if somone knows if it's possible to
> insert/add information to a mysql database from PHP? If so, how would they
> go about it? Thanks for any help!
>
> Sincerely,
>
> Jero
$result = mysql_query("INSERT INTO table (row_one, row_two) VALUES ('value 1',
'value 2'", $db_connection);
easy as p-i-e :)
Any valid SQL query can be executed with mysql_query.
--
James Atkinson
-----------------------------------------------------------------
James Atkinson 100world
Technical Developer 512-1529 West 6th Avenue
phone: +1-604-637-8122 Vancouver, BC, V6J 1R1
fax: +1-604-742-1770 Canada
email: james.atkinson@100world.com http://www.100world.com
+---------------------------------------------------------------+
| This message may contain confidential and/or privileged |
| information. If you are not the addressee or authorized to |
| receive this for the addressee, you must not use, copy, |
| discolse or take any action based on this message or any |
| information herein. If you have received this message in |
| error, please advise the sender immediately by reply e-mail |
| and delete this message. Thank you for you cooperation |
+---------------------------------------------------------------+