Jump to content


This topic is now archived and is closed to further replies.


using store_result() with dates

Recommended Posts

I am in the process of converting my app to use the new mysqli library and using bound parameters/results etc.

I am having trouble selecting dates from the database when storing the result.
I need to perform a select query on a date column and a LONGTEXT column in the same table. Because, as I understand it, I need to store_result in order to get the data for the LONGTEXT column, but in doing so it stuffs up the data returned for the date column.
How do I get around this as I dont want to do 2 different database queries just to get the data from the same table.

At the moment I create a connection to the database, prepare a database statement, bind the paramters, execute the statement, store the result (store_result), bind the return parameters, fetch the data. The LONGTEXT data is returned fine but the date data isn't. If I don't store the result, the date data is returned fine but then obviously the LONGTEXT isn't.

The incorrect date or LONGTEXT comes out of the DB looking like:

Is this a bug in mysqli or am I missing something?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.