Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 3.1.7 unbuffered_row() returning NULL but row() works
#4

(04-24-2018, 06:46 AM)pbarney Wrote: Has anyone seen this?

The thread has been viewed ~130 times (this is shown in the topics list). Most wouldn't reply because they don't know the answer, as it should be - noone benefits from "I don't know" replies. I didn't reply because (pre-edit; and I just now see the added question at the end) how unbuffered_row() works is already explained in the documentation, and it seemed like you're on the right path to finding it out yourself anyway.

When you want to add more info/ask more questions, just reply again.

(03-10-2018, 11:22 AM)pbarney Wrote: New question: Is there a way to display the results of a query and simultaneously save the CSV of results without having to run the query twice?

It might be possible (I'm not entirely sure, and if it is, it would depend on the DB driver in use), but the real problem is that there's no reason why you or anyone else should ever need it to be.

You shouldn't slow down responses by doing archiving work at the same time, for the same reason why you shouldn't send emails from the web process, do database backups, etc. It might look like an easy way to do it, but it always causes problems down the line - large datasets will take lots of time to process (and might exhaust the memory limit, which is why unbuffered_row() is used here), networking issues can cause hangs, users can stop execution in the middle ...

Display what you need to display and be done with it. If for some reason, you need to archive something - make cronjobs do it.
Reply


Messages In This Thread
RE: CodeIgniter 3.1.7 unbuffered_row() returning NULL but row() works - by Narf - 04-24-2018, 07:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB