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 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 wor
2010/3/12 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?
>
> T
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.
M
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 of
2010/3/11 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?
Woul
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 Gene
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 th
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
ot
/*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 = "IN
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 functi
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 = "inse
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 (http://www.php
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 .
Jack Scott a écrit :
Try this:
$insertQuery = "Insert into TABLE
(
col_one,
col_two
)values (
'" . $this -> firstName . "',
'" . $this-> lastName . "'
)";
$db =& new
Try this:
$insertQuery = "Insert into TABLE
(
col_one,
col_two
)values (
'" . $this -> firstName . "',
'" . $this-> lastName . "'
)";
$db =& new DB;
$res
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
16 matches
Mail list logo