Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /var/www/html/utilities.php on line 10
MySQL Error:
select
announcement.*
from
announcement
, content_index
, at_location
, site_location
where
#determine what topic and data type you need:
site_location.topic like 'main'
and site_location.type='announcement'
and content_index.content_id=announcement.content_id
#determine if publish date has been reached
#this date/time should be the current date/time
#from php
and
(( pub_date<=now() # and preview=0
)
# or (preview=1)
)
# Uncommented if multiple items exist for a location (ie glossary)
and ( ( exp_date>=now() # and preview=0
)
# or (preview=1)
)
#the next four lines dont have to be touched
and content_index.type=site_location.type
and
((announcement.version_id=content_index.approved_version
# and preview=0) or
# (content_index.preview = 1
# and content_index.working_version=announcement.version_id)
)
)
and content_index.content_id=at_location.content_id
and at_location.location_id=site_location.location_id
# Uncomment if only one item can exist in a location (ie announcement)
order by # preview desc, preview_date desc,
pub_date desc
limit 1
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/html/announcements.php on line 26
|