mod_dbd and prepared statements (httpd-2.2.9)

2008-10-13 Thread Andrej van der Zee
Hi, I am trying to use prepared INSERT statements for mod_dbd with the mysql driver, but somehow always a 0 is written to the database instead of a string. This is what I do: // In configuration directives stage ap_dbd_prepare(s, "INSERT INTO request_type (name) VALUES (%s) " "ON DUPLICATE KE

Re: mod_dbd and prepared statements (httpd-2.2.9)

2008-10-17 Thread Jérôme Renard
Hi Andrej. Have you found a solution to your issue ? If no, could you post the full source code here or on pastebin so the code is highlighted ? Have a nice day. Best Regards. -- Jérôme :)

Re: mod_dbd and prepared statements (httpd-2.2.9)

2008-10-18 Thread Sorin Manolache
On Sat, Oct 18, 2008 at 15:20, Andrej van der Zee <[EMAIL PROTECTED]> wrote: > Hi, > > I did not find a solution, I just stopped using prepared statements > altogether. But I tried to isolate the problem just now, and found somehow > that I cannot use FLOAT in prepared statement somehow (when I tri

Re: mod_dbd and prepared statements (httpd-2.2.9)

2008-10-18 Thread Andrej van der Zee
Hi, You call ap_dbd_prepare from prep_stmt_config_set_prep_stmt_on. This > function is called during the conf parsing phase when there are no > apache children processes. cmd->server refers to the server structure > of the root apache process (the parent of all future apache children). > Then the

Re: mod_dbd and prepared statements (httpd-2.2.9)

2008-10-18 Thread Tom Donovan
Andrej van der Zee wrote: Hi, I did not find a solution, I just stopped using prepared statements altogether. But I tried to isolate the problem just now, and found somehow that I cannot use FLOAT in prepared statement somehow (when I tried INT columns it even segfaults). Below the source code o

Re: mod_dbd and prepared statements (httpd-2.2.9)

2008-10-18 Thread Andrej van der Zee
Hi, * apr_dbd_pvquery is only for string values. > > You must use apr_dbd_pvbquery (with a "b") for binary values. > > see: > http://apr.apache.org/docs/apr-util/1.3/group___a_p_r___util___d_b_d.html I tried both versions, but without success. But that was because I did not pass pointers to fl