Elxis CMS Forum

Support => Database => Topic started by: rentasite on February 24, 2007, 00:47:28

Title: DB function failed with error number 0
Post by: rentasite on February 24, 2007, 00:47:28

I decided to clear up all of the content, after a fresh installation i did. And i got this StRaNgE error: (Before the deletion i did, everything worked well).

DB function failed with error number 0

SQL =

SELECT c.id, c.title, c.introtext, c.state, c.sectionid, c.catid, c.created, c.modified, c.created_by, c.images,
               s.title AS sectiontitle, ct.title AS cattitle, u.name AS author
        FROM elx_content as c
        LEFT JOIN elx_sections as s ON s.id=c.sectionid
        LEFT JOIN elx_categories AS ct ON ct.id=c.catid
        LEFT JOIN elx_users AS u ON u.id=c.created_by
 WHERE c.catid=3
 AND ( c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= now() )
              AND ( c.publish_down = '0000-00-00 00:00:00' OR c.publish_down >= now() )
              AND c.state != -1 AND c.state != 0
 ORDER BY c.title DESC
 LIMIT 1
 OFFSET 0
Title: Re: DB function failed with error number 0
Post by: rentasite on February 24, 2007, 01:00:25

I'll give the answer by myself  ;D

The error appeared, because 3 modules were trying to show data that i deleted before.
Title: Re: DB function failed with error number 0
Post by: datahell on February 24, 2007, 01:07:16
Quote from: supernet
AND ( c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= now() )
              AND ( c.publish_down = '0000-00-00 00:00:00' OR c.publish_down >= now() )

The above is incompatible with Elxis. Where did you found this? In a third party module?
Elxis does not like invalid dates like 0000-00-00 00:00:00

change them to:
publish up: 1979-12-19 00:00:00
publish down: 2060-01-01 00:00:00
Title: Re: DB function failed with error number 0
Post by: rentasite on February 24, 2007, 01:09:20

Google this: FlexContent  ;)
Title: Re: DB function failed with error number 0
Post by: rentasite on February 24, 2007, 01:16:10

I found this also

($item->modified != '0000-00-00 00:00:00')  :-\
Title: Re: DB function failed with error number 0
Post by: datahell on February 24, 2007, 09:42:08
1979-12-19 00:00:00 also
Title: Re: DB function failed with error number 0
Post by: rentasite on February 25, 2007, 02:46:39

Thanks datahell !