PHP MySQL Insert Statements

PHP MySQL Insert Statements

am 12.03.2010 03:13:49 von 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP MySQL Insert Statements

am 12.03.2010 03:33:33 von Bruno Fajardo

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?

Would you mind giving us some hints about how the INSERT statements looks like?

Thanks.

>
> Thank you.
>
>
> Martine
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP MySQL Insert Statements

am 12.03.2010 03:38:55 von 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 of the insert statement.

Do your insert statements work if used in MySQL Query Browser?

What is MySQL returning?

Are you using OOP or old functions?

Have you tried having PHP echo your insert statement so you can see
exactly what you are sending MySQL?

Stephen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP MySQL Insert Statements

am 12.03.2010 06:49:17 von 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.
>
>
> Martine
>

Should be trivial to find out what's happening. Something
like:

$success=mysql_query($insert_statement) or die("Uh-oh, mysql said:".mysql.error());


HTH,

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP MySQL Insert Statements

am 16.03.2010 16:47:52 von ro0ot.w00t

--00032555ac06a734080481eceb10
Content-Type: text/plain; charset=ISO-8859-1

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?
>
> The assigned permissions to that account.
Using MySQL, you can define *who* is allowed to do *what*. (i.e. SELECT,
INSERT, GRANT)
(or syntax errors in your insert statements, like others said before.)
Regards

--00032555ac06a734080481eceb10--

Re: PHP MySQL Insert Statements

am 16.03.2010 17:10:17 von 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 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.
>
>
> Martine
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php