php-developer-list | 2000111
Date: 11/15/00
- Next message: andrei <email protected>: "[PHP-DEV] PHP 4.0 Bug #7749 Updated: addslashes wrong thing to do"
- Previous message: Adam Wright: "Re: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: n.vieira <email protected>: "[PHP-DEV] PHP 4.0 Bug #7830: How can I insert new records into a table?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 0, n.vieira <email protected> wrote:
> From: n.vieira <email protected>
> Operating system: Windows 98
> PHP version: 4.0.3pl1
> PHP Bug Type: MySQL related
> Bug description: How can I insert new records into a table?
>
> I have been trying to insert records into a mysql table using mysql_query() and mysql_db_query() but i have had no success...
> Is there a mysql_insert() command? If there is then what is the syntax?
> How can i insert records with mysql?
This has nothing to do with PHP, mysql_query only passes a command to the
mysql server. You have to use the INSERT command in the SQL query you pass
to mysql_query(). like:
$querystring="INSERT INTO tablename (column1, column2) VALUES (value1, value2)";
mysql_query($querystring);
See the mysql manual (www.mysql.com) for more details.
Hylke
-- Hi, I'm a signature virus. plz set me as your signature and help me spread :)-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: andrei <email protected>: "[PHP-DEV] PHP 4.0 Bug #7749 Updated: addslashes wrong thing to do"
- Previous message: Adam Wright: "Re: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: n.vieira <email protected>: "[PHP-DEV] PHP 4.0 Bug #7830: How can I insert new records into a table?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

