Welcome Guest, Not a member yet? Register   Sign In
db->insert strange error
#1

[eluser]nikolaaa[/eluser]
When I insert some data in DB I got something like this in mysql database:

[BLOB - 28 B]
or
[BLOB - 6 B]

If I just print on that page after inserting in DB all $_POST variables
all looks fine.

Fields are text type and utf8_bin collation

Do you have idea where is problem?


Thanks,
Nikola
#2

[eluser]MadZad[/eluser]
Nikola,
I'm not quite clear on the question, but I'm going to take a guess that the column in your DB table that's getting inserted to is of type blob (google on "mysql blob" for more info) but does not need to be. I only use Binary Large OBjects when storing images or PDFs, so I wouldn't expect my DB tools to display them - I just get messages like "blob 230K".

If you're really trying to store POST input, then I'd imagine you're dealing with user input strings, so try changing your DB column to type varchar.

If this were a Java project using Hibernate, there'd be about a million other things to look into as potential problems, but thankfully this should me much more straightforward. ;-)




Theme © iAndrew 2016 - Forum software by © MyBB