I already know why it is being set to an empty string: That is simply
what has been stored by the formsgeneration class that I'm using.
I would have expected metastorage to to find that a variable that
should be an integer is actually an empty string, and produce an
error, OR to convert it to NULL. I would not expect it to go on
producing invalid SQL.
But clearly my expectation of metastorage was incorrect.
Thanks again for your help.
Cheers,
Nik.
On 20/09/2008, at 3:16 PM, Manuel Lemos wrote:
> Hello
>
> on 09/20/2008 02:13 AM Nik Sands said the following:
> > Good idea. :-)
> >
> > Below is the last few lines of the var_dump($inventory_item) output.
> > To my inexperienced eye, it appears that it has the value of an
> empty
> > string. Perhaps the real essence of the problem, is that it is being
> > assigned a string rather than an integer?
> >
> > Below that, you can also see the debugoutput. Again, I have to ask
> > why the '?' in the 'PrepareQuery' is not being converted into
> either a
> > legitimate value, nor a NULL in the SQL query? (you said that it
> > should be converted into either one or the other, but it ends up
> being
> > converted into nothing at all, making for invalid SQL).
>
> > ["grams"]=>
> > string(0) ""
>
> As you may see the grams variable is set to an empty string "" and not
> null as it should be. Now you need to check your code to figure why it
> is not being set to null .
>
> --
>
> Regards,
> Manuel Lemos
>
> Find and post PHP jobs
> http://www.phpclasses.org/jobs/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
>
========================================================
NIXANZ - http://nixanz.com/
Like to help out as a beta tester? Let me know which application
you'd like to test.
[Non-text portions of this message have been removed]