Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN users_control_organizations
ON users_control_organ' at line 60 [CORE/cake/libs/model/datasources/dbo_source.php, line 514]
$sql = "SELECT *
FROM (
SELECT opportunity_group_listings.title,
opportunity_group_listings.description,
opportunity_group_listings.created,
opportunity_group_listings.date_start,
opportunity_group_listings.date_end,
opportunity_group_listings.time_start,
opportunity_group_listings.time_end,
opportunity_group_listings.address_id,
ratings.comment,
groups.name AS group_name,
groups.description AS group_description,
groups.organization_id,
groups.id AS group_id,
opportunity_group_listings.group_id IS NOT NULL as listed,
opportunity_groups.opportunity_type_id,
IF(date_end IS NULL OR date_end = 0 OR date_start >= CURDATE(),
date_start,
date_end) AS note_date,
date_end IS NOT NULL AND date_end <> 0 AND date_end < CURDATE() AS expired,
date_start <= CURDATE() AS started,
DATEDIFF(date_start, CURDATE()) AS days_until_start,
opportunity_group_listings_active.group_id IS NOT NULL AS active,
-- Generate the display string describing date range
CONCAT(
'<em>',
IF(date_start > CURDATE(), 'Starts', 'Started'),
':</em> ',
IF(date_start = CURDATE(),
'<strong>Today!</strong>',
DATE_FORMAT(date_start, '%c/%e/%Y')
),
IF(date_end IS NULL OR date_end = 0,
' (Ongoing)',
CONCAT(
'<br/> ',
IF(date_start <= CURDATE(), '<strong>', ''),
'<em>Until:</em> ', DATE_FORMAT(date_end, '%c/%e/%Y'),
IF(date_start <= CURDATE(), '</strong>', '')
)
)
) AS dates,
SUM(ratings.banned AND opportunity_group_listings_ratings.review_count = opportunity_group_listings.review_count) AS banned,
SUM(ratings.rejected AND opportunity_group_listings_ratings.review_count = opportunity_group_listings.review_count) AS rejected,
SUM(ratings.recommended) AS stars
FROM opportunity_groups
JOIN groups ON groups.id = opportunity_groups.group_id
JOIN organizations ON organizations.id = groups.organization_id
JOIN organizations_active
ON organizations_active.organization_id = organizations.id JOIN opportunity_group_listings
ON opportunity_group_listings.group_id = opportunity_groups.group_id
LEFT JOIN opportunity_group_listings_visible_official_schools
ON opportunity_group_listings_visible_official_schools.group_id = groups.id
LEFT JOIN users_schools AS OppIsVisibleToMySchools
ON OppIsVisibleToMySchools.school_id = opportunity_group_listings_visible_official_schools.school_id
AND OppIsVisibleToMySchools.user_id =
LEFT JOIN users_control_organizations
ON users_control_organizations.organization_id = groups.organization_id
AND users_control_organizations.user_id =
LEFT JOIN opportunity_group_listings_active
ON opportunity_group_listings_active.group_id = groups.id
LEFT JOIN groups_deleted
ON groups_deleted.group_id = opportunity_groups.group_id
LEFT JOIN opportunity_group_listings_ratings
ON opportunity_group_listings_ratings.group_id = opportunity_groups.group_id
LEFT JOIN ratings ON ratings.id = opportunity_group_listings_ratings.rating_id
WHERE groups_deleted.group_id IS NULL
AND (opportunity_group_listings_visible_official_schools.group_id IS NULL
OR OppIsVisibleToMySchools.user_id IS NOT NULL
OR users_control_organizations.user_id IS NOT NULL) AND (date_end IS NULL OR date_end = 0 OR date_end >= CURDATE()) AND (opportunity_group_listings_active.group_id IS NOT NULL OR opportunity_group_listings.group_id IS NULL) GROUP BY opportunity_groups.group_id
HAVING IFNULL(banned = 0 AND rejected < 2, TRUE)
) Opportunity
JOIN opportunity_types OpportunityType
ON OpportunityType.id = Opportunity.opportunity_type_id
WHERE Opportunity.organization_id = 2017 ORDER BY created DESC LIMIT 5"
$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN users_control_organizations
ON users_control_organ' at line 60"
$out = null
DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 514
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337
DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php, line 221
Model::query() - CORE/cake/libs/model/model.php, line 2285
OpportunityGroupListing::allOpps() - APP/models/opportunity_group_listing.php, line 745
OrganizationsController::view() - APP/controllers/organizations_controller.php, line 355
Object::dispatchMethod() - CORE/cake/libs/object.php, line 117
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 245
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 211
[main] - APP/webroot/index.php, line 88
Query: SELECT *
FROM (
SELECT opportunity_group_listings.title,
opportunity_group_listings.description,
opportunity_group_listings.created,
opportunity_group_listings.date_start,
opportunity_group_listings.date_end,
opportunity_group_listings.time_start,
opportunity_group_listings.time_end,
opportunity_group_listings.address_id,
ratings.comment,
groups.name AS group_name,
groups.description AS group_description,
groups.organization_id,
groups.id AS group_id,
opportunity_group_listings.group_id IS NOT NULL as listed,
opportunity_groups.opportunity_type_id,
IF(date_end IS NULL OR date_end = 0 OR date_start >= CURDATE(),
date_start,
date_end) AS note_date,
date_end IS NOT NULL AND date_end <> 0 AND date_end < CURDATE() AS expired,
date_start <= CURDATE() AS started,
DATEDIFF(date_start, CURDATE()) AS days_until_start,
opportunity_group_listings_active.group_id IS NOT NULL AS active,
-- Generate the display string describing date range
CONCAT(
'',
IF(date_start > CURDATE(), 'Starts', 'Started'),
': ',
IF(date_start = CURDATE(),
'Today!',
DATE_FORMAT(date_start, '%c/%e/%Y')
),
IF(date_end IS NULL OR date_end = 0,
' (Ongoing)',
CONCAT(
' ',
IF(date_start <= CURDATE(), '', ''),
'Until: ', DATE_FORMAT(date_end, '%c/%e/%Y'),
IF(date_start <= CURDATE(), '', '')
)
)
) AS dates,
SUM(ratings.banned AND opportunity_group_listings_ratings.review_count = opportunity_group_listings.review_count) AS banned,
SUM(ratings.rejected AND opportunity_group_listings_ratings.review_count = opportunity_group_listings.review_count) AS rejected,
SUM(ratings.recommended) AS stars
FROM opportunity_groups
JOIN groups ON groups.id = opportunity_groups.group_id
JOIN organizations ON organizations.id = groups.organization_id
JOIN organizations_active
ON organizations_active.organization_id = organizations.id JOIN opportunity_group_listings
ON opportunity_group_listings.group_id = opportunity_groups.group_id
LEFT JOIN opportunity_group_listings_visible_official_schools
ON opportunity_group_listings_visible_official_schools.group_id = groups.id
LEFT JOIN users_schools AS OppIsVisibleToMySchools
ON OppIsVisibleToMySchools.school_id = opportunity_group_listings_visible_official_schools.school_id
AND OppIsVisibleToMySchools.user_id =
LEFT JOIN users_control_organizations
ON users_control_organizations.organization_id = groups.organization_id
AND users_control_organizations.user_id =
LEFT JOIN opportunity_group_listings_active
ON opportunity_group_listings_active.group_id = groups.id
LEFT JOIN groups_deleted
ON groups_deleted.group_id = opportunity_groups.group_id
LEFT JOIN opportunity_group_listings_ratings
ON opportunity_group_listings_ratings.group_id = opportunity_groups.group_id
LEFT JOIN ratings ON ratings.id = opportunity_group_listings_ratings.rating_id
WHERE groups_deleted.group_id IS NULL
AND (opportunity_group_listings_visible_official_schools.group_id IS NULL
OR OppIsVisibleToMySchools.user_id IS NOT NULL
OR users_control_organizations.user_id IS NOT NULL) AND (date_end IS NULL OR date_end = 0 OR date_end >= CURDATE()) AND (opportunity_group_listings_active.group_id IS NOT NULL OR opportunity_group_listings.group_id IS NULL) GROUP BY opportunity_groups.group_id
HAVING IFNULL(banned = 0 AND rejected < 2, TRUE)
) Opportunity
JOIN opportunity_types OpportunityType
ON OpportunityType.id = Opportunity.opportunity_type_id
WHERE Opportunity.organization_id = 2017 ORDER BY created DESC LIMIT 5
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/sweatmonkey.org/trunk-1007/htdocs/cake/basics.php:111) [APP/app_controller.php, line 139]
header - [internal], line ??
AppController::beforeRender() - APP/app_controller.php, line 139
OrganizationsController::beforeRender() - APP/controllers/organizations_controller.php, line 155
Controller::render() - CORE/cake/libs/controller/controller.php, line 731
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 248
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 211
[main] - APP/webroot/index.php, line 88
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/sweatmonkey.org/trunk-1007/htdocs/cake/basics.php:111) [APP/app_controller.php, line 143]
header - [internal], line ??
AppController::beforeRender() - APP/app_controller.php, line 143
OrganizationsController::beforeRender() - APP/controllers/organizations_controller.php, line 155
Controller::render() - CORE/cake/libs/controller/controller.php, line 731
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 248
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 211
[main] - APP/webroot/index.php, line 88
CASA of Baltimore’s mission is to provide a voice for children involved in the juvenile court system, ensuring that abused and neglected children are placed in safe permanent homes and that consideration is given to their educational, medical and social service needs. Court Appointed Special Advocates (CASA) of Baltimore recruits, trains, and supervises volunteers, appointed to individual foster children by the Baltimore City Juvenile Court, to provide written, objective recommendations to the Court, to serve as a consistent adult presence, and to monitor that child's well-being.
Shoutbox
A logo has not yet been uploaded for
CASA of Baltimore City.
Would you like to upload it now?