Re: [PHP] PHP MySQL Insert Statements

2010-03-16 Thread Jan G.B.
2010/3/12 Martine Osias webi...@gmail.com Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from

Re: [PHP] PHP MySQL Insert Statements

2010-03-16 Thread Ryan Sun
Always make sure your dynamic sql string in php code are as expected var_dump($sql) before query On Thu, Mar 11, 2010 at 10:13 PM, Martine Osias webi...@gmail.com wrote: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database

[PHP] PHP MySQL Insert Statements

2010-03-11 Thread Martine Osias
Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Thank you. Martine -- PHP

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Bruno Fajardo
2010/3/11 Martine Osias webi...@gmail.com: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Stephen
Martine Osias wrote: My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Most likely syntax

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Kevin Kinsey
Martine Osias wrote: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Thank you.

[PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
/*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in other columns*/ Code: foreach($list as $key=$value) { $query =

RE: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread admin
Insert is for a new row Alter or Update is for an exsisting row /*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in

Re: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
Thanks :-) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Insert is for a new row Alter or Update is for an exsisting row /*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table.

[PHP] PHP MySQL insert

2005-08-18 Thread Jon
Please help with an insert problem. Sometimes $data1 could have a comma and that messes up the insert. how do I get around that? $query = insert into testtable6 (indx, col1, col2) values (NULL, '$data1', '$data2'); mysql_db_query(testdb, $query); -- PHP General Mailing List

Re: [PHP] PHP MySQL insert

2005-08-18 Thread Chris
You need to escape the data, so $data1 = mysql_real_escape_string($data1,$rLink); $data2 = mysql_real_escape_string($data2,$rLink); Jon wrote: Please help with an insert problem. Sometimes $data1 could have a comma and that messes up the insert. how do I get around that? $query =

Re: [PHP] PHP MySQL insert

2005-08-18 Thread Jordan Miller
besides just escaping your strings, i think you are having a quoting error: http://www.php.net/manual/en/language.types.string.php Commas should not have to be escaped, and indeed the mysql_real_escape_string() function will not escape commas. After escaping your input data with this

[PHP] php-mySQL insert problem

2005-08-01 Thread Adi Zebic
Hi, I'm new in php so like usual I have little problem(s). I have DB clas who connect to database, select database, query database and so on. I have other class User with some members. exemple: ... var $firstName; var $lastName; ... Then I need to insert created object into mySQL database

Re: [PHP] php-mySQL insert problem

2005-08-01 Thread Jack Scott
Try this: $insertQuery = Insert into TABLE ( col_one, col_two )values ( ' . $this - firstName . ', ' . $this- lastName . ' ); $db = new DB; $res =

[PHP] Re: SOLVED - [PHP] php-mySQL insert problem

2005-08-01 Thread Adi Zebic
Jack Scott a écrit : Try this: $insertQuery = Insert into TABLE ( col_one, col_two )values ( ' . $this - firstName . ', ' . $this- lastName . ' ); $db = new DB;

Re: [PHP] Re: SOLVED - [PHP] php-mySQL insert problem

2005-08-01 Thread Jack Scott
no prob ;-) On Tue, 2005-08-02 at 02:27 +0200, Adi Zebic wrote: Jack Scott a écrit : Try this: $insertQuery = Insert into TABLE ( col_one, col_two )values ( ' . $this - firstName . ',