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
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
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
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
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
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.
/*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 =
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
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.
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
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 =
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
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
Try this:
$insertQuery = Insert into TABLE
(
col_one,
col_two
)values (
' . $this - firstName . ',
' . $this- lastName . '
);
$db = new DB;
$res =
Jack Scott a écrit :
Try this:
$insertQuery = Insert into TABLE
(
col_one,
col_two
)values (
' . $this - firstName . ',
' . $this- lastName . '
);
$db = new DB;
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 . ',
16 matches
Mail list logo