1. keep
  2. RO CSVI
  3. Saturday, 15 May 2021
  4.  Subscribe via email
Is it possible to import NULL value to a DATETIME field of a custom table?
Accepted Answer Pending Moderation
Hello,
Which is the custom table you are trying to import? In most cases the default set to the DATETIME field is 0000-00-00 00:00:00 and null is set to No in table definition so importing NULL will set the value to 0000-00-00 00:00:00 in database.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi

The table is a non-Joomla table where a DATETIME field contains a timestamp when the record should be processed by an external script. When the process is done, the script set a NULL value to the field (not 0000-00-00 00:00:00).
The main goal would be manage this table via RO CSVI. But when a timestamp is available and I want to prevent the processing for the record I should set NULL to the field. When I send an empty value, the field doesn't change. I can send zero or even 0000-00-00 00:00:00 but the external script uses NULL. Can I import NULL instead of 0000-00-00 00:00:00
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
With the attached patch file, you should be able to import NULL values for custom table. Load the patch file from RO CSVI Maintenance page and run the import. Let me know on how import goes.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!