RE: [PEAR] DB insufficient data error
| From: | Matt Horner | Date: | Wed, 03 Mar 2004 13:38:40 +0000 |
| Subject: | RE: [PEAR] DB insufficient data error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11074@lists.php.net to get a copy of this message | ||
The ! And ' (single-quote) in the query are included like this:
REPLACE INTO Table (F1, F2) VALUES ("Value1", "Value2!");
The failure happens on the prepare statement. However, when I send
something to the query minus the ! its fine. However, I perform the
same query through the MySQL client and have no problems at all.
Can anybody give me a more definite explanation of the the error
description.
I am beginning to work with the PEAR DB module, and I would really
like
to have a more informative explanation of what the error means,
rather than
just the insufficient data error.
Thanks again,
Matt
-----Original Message-----
From: Herman Sinte Maartensdijk [mailto:h.sintemaartensdijk@endex.nl]
Sent: Wednesday, March 03, 2004 3:06 AM
To: matt@wiredata.com
Subject: RE: [PEAR] DB insufficient data error
You prepare queries with ! in it? ! is a wildcard for preparation (which is
a feature that isn't supported by MySQL so it has no real use using it).
However if you do preapre a query with a ! in it then on Execute it will
expect the value that should be entered for this wildcard. SInce you
probably did not intend this behaviour you do not provide any variables,
which causes your error. Please read the manual on prepare & execute
-----Original Message-----
From: Matt Horner [mailto:mhorner@wiredata.com]
Sent: Tuesday, March 02, 2004 19:00
To: 'Firman Wandayandi'
Cc: 'PHP-GEN'
Subject: RE: [PEAR] DB insufficient data error
Thanks for your response Firman.
The database server is MySQL. I have checked the query in
the client and verified that the query was correct. However,
I have added slashes to the values that are being replaced,
and still resulting in the same problem. I am getting the
problem whenever there is a special character in the query,
such as, ' (single-quote) and ! (exclamation-point), are just
a few of the examples that I have tried. A print_r of the
object shows the query is being correctly slashed for the
single-quote.
Any other ideas?
Matt
-----Original Message-----
From: Firman Wandayandi [mailto:fwd@vfemail.net]
Sent: Tuesday, March 02, 2004 10:49 AM
To: matt@wiredata.com
Cc: PHP-GEN
Subject: Re: [PEAR] DB insufficient data error
What's your database server? Make sure the query command is correct.
Regards,
Firman
----- Original Message -----
From: "Matt Horner" <mhorner@wiredata.com>
To: <pear-general@lists.php.net>
Sent: Tuesday, March 02, 2004 11:27 PM
Subject: [PEAR] DB insufficient data error
>
> Hi all,
>
> Can anyone tell me what "DB Error: insufficient data supplied" exactly
> means? I am getting this
> error in a few different queries which are actually all replace into
> queries.
>
> This is a MySQL (obviously by the "replace into") query that I am
> working with.
>
> Thanks!
> Matt
>
>
> Matt Horner
> Programmer/Anaylst
> WIREdata Corp.
> mhorner@wiredata.com
>
>
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php