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 'Cook OR `Friend`.`friend_id` = Tim Cook)
					AND (`Account`.`id` <> Tim Cook) A' at line 5 [CORE/cake/libs/model/datasources/dbo_source.php, line 521]

Query: SELECT `Account`.`id` FROM `accounts` AS `Account` LEFT JOIN `friends` AS `Friend` ON (`Account`.`id` = `Friend`.`account_id` OR `Account`.`id` = `Friend`.`friend_id`) WHERE ((`Friend`.`account_id` = Tim Cook OR `Friend`.`friend_id` = Tim Cook) AND (`Account`.`id` <> Tim Cook) AND (`Friend`.`approved` = 1));

Warning (2): Invalid argument supplied for foreach() [APP/models/account.php, line 280]
 TravelScoops: Profile »

Profile »

See All Trips
  This trip currently has no scoops. Why not let people know more about the trip by uploading photos, videos and blogs?  
Blogs by
  Start sharing your holiday blogs with your friends - and if you want, the world!  
Photographs by
  Start sharing your holiday photos with your friends - and if you want, the world!  
Videos by
  Start sharing your holiday videos with your friends - and if you want, the world!  
app/webroot/index.php (line 93)
0.9094
(default) 42 queries took 29 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1DESCRIBE `accounts`19191
2DESCRIBE `trip_destinations`15151
3DESCRIBE `trips`12126
4DESCRIBE `featured_trips`551
5DESCRIBE `scoops`992
6DESCRIBE `blogs`771
7DESCRIBE `comments`771
8DESCRIBE `ratings`771
9DESCRIBE `friend_tags`771
10DESCRIBE `photo_albums`550
11DESCRIBE `photos`771
12DESCRIBE `videos`991
13DESCRIBE `trip_members`661
14DESCRIBE `trip_followers`441
15DESCRIBE `trip_invites`991
16DESCRIBE `trip_join_requests`551
17DESCRIBE `user_locations`991
18DESCRIBE `friends`771
19DESCRIBE `friend_invites`991
20DESCRIBE `wish_lists`10101
21DESCRIBE `friend_groups`441
22DESCRIBE `friend_group_links`441
23DESCRIBE `messages`881
24SELECT `cake_sessions`.`data` FROM `cake_sessions` WHERE `cake_sessions`.`id` = 'e72e664cd5eada79310a4c2acbf2c224'110
25SELECT `Account`.`id`, `Account`.`forename`, `Account`.`surname`, `Account`.`nickname`, `Account`.`email`, `Account`.`password`, `Account`.`dob`, `Account`.`gender`, `Account`.`privacy_level`, `Account`.`nationality`, `Account`.`photo_filename`, `Account`.`fb_uid`, `Account`.`use_fb`, `Account`.`email_hash`, `Account`.`permission_group_id`, `Account`.`status`, `Account`.`disabled`, `Account`.`created`, `Account`.`modified`, `TripLocation`.`id`, `TripLocation`.`trip_id`, `TripLocation`.`start_date`, `TripLocation`.`end_date`, `TripLocation`.`name`, `TripLocation`.`country`, `TripLocation`.`country_code`, `TripLocation`.`geoname_id`, `TripLocation`.`longitude`, `TripLocation`.`latitude`, `UserLocation`.`id`, `UserLocation`.`account_id`, `UserLocation`.`name`, `UserLocation`.`country`, `UserLocation`.`country_code`, `UserLocation`.`geoname_id`, `UserLocation`.`longitude`, `UserLocation`.`latitude`, `UserLocation`.`created` FROM `accounts` AS `Account` LEFT JOIN `trip_destinations` AS `TripLocation` ON (`TripLocation`.`start_date` <= NOW() AND `TripLocation`.`end_date` >= NOW() AND `TripLocation`.`trip_id` IN (SELECT `TM`.`trip_id` FROM trip_members AS TM WHERE `TM`.`account_id` = `Account`.`id`)) LEFT JOIN `user_locations` AS `UserLocation` ON (`UserLocation`.`account_id` = `Account`.`id`) WHERE `Account`.`id` = 'Tim Cook' GROUP BY `Account`.`id` LIMIT 1001
26SELECT `Friend`.`id`, `Friend`.`account_id`, `Friend`.`friend_id`, `Friend`.`approved`, `Friend`.`id_hash`, `Friend`.`created`, `Friend`.`modified`, `Friend1`.`id`, `Friend1`.`forename`, `Friend1`.`surname`, `Friend1`.`nickname`, `Friend1`.`email`, `Friend1`.`password`, `Friend1`.`dob`, `Friend1`.`gender`, `Friend1`.`privacy_level`, `Friend1`.`nationality`, `Friend1`.`photo_filename`, `Friend1`.`fb_uid`, `Friend1`.`use_fb`, `Friend1`.`email_hash`, `Friend1`.`permission_group_id`, `Friend1`.`status`, `Friend1`.`disabled`, `Friend1`.`created`, `Friend1`.`modified`, `Friend2`.`id`, `Friend2`.`forename`, `Friend2`.`surname`, `Friend2`.`nickname`, `Friend2`.`email`, `Friend2`.`password`, `Friend2`.`dob`, `Friend2`.`gender`, `Friend2`.`privacy_level`, `Friend2`.`nationality`, `Friend2`.`photo_filename`, `Friend2`.`fb_uid`, `Friend2`.`use_fb`, `Friend2`.`email_hash`, `Friend2`.`permission_group_id`, `Friend2`.`status`, `Friend2`.`disabled`, `Friend2`.`created`, `Friend2`.`modified` FROM `friends` AS `Friend` LEFT JOIN `accounts` AS `Friend1` ON (`Friend`.`account_id` = `Friend1`.`id`) LEFT JOIN `accounts` AS `Friend2` ON (`Friend`.`friend_id` = `Friend2`.`id`) WHERE ((((`Friend`.`account_id` IS NULL) AND (`Friend`.`friend_id` = 'Tim Cook'))) OR (((`Friend`.`account_id` = 'Tim Cook') AND (`Friend`.`friend_id` IS NULL)))) AND `Friend`.`approved` = 1 LIMIT 1000
27SELECT `Friend`.`id`, `Friend`.`account_id`, `Friend`.`friend_id`, `Friend`.`approved`, `Friend`.`id_hash`, `Friend`.`created`, `Friend`.`modified`, `Friend1`.`id`, `Friend1`.`forename`, `Friend1`.`surname`, `Friend1`.`nickname`, `Friend1`.`email`, `Friend1`.`password`, `Friend1`.`dob`, `Friend1`.`gender`, `Friend1`.`privacy_level`, `Friend1`.`nationality`, `Friend1`.`photo_filename`, `Friend1`.`fb_uid`, `Friend1`.`use_fb`, `Friend1`.`email_hash`, `Friend1`.`permission_group_id`, `Friend1`.`status`, `Friend1`.`disabled`, `Friend1`.`created`, `Friend1`.`modified`, `Friend2`.`id`, `Friend2`.`forename`, `Friend2`.`surname`, `Friend2`.`nickname`, `Friend2`.`email`, `Friend2`.`password`, `Friend2`.`dob`, `Friend2`.`gender`, `Friend2`.`privacy_level`, `Friend2`.`nationality`, `Friend2`.`photo_filename`, `Friend2`.`fb_uid`, `Friend2`.`use_fb`, `Friend2`.`email_hash`, `Friend2`.`permission_group_id`, `Friend2`.`status`, `Friend2`.`disabled`, `Friend2`.`created`, `Friend2`.`modified` FROM `friends` AS `Friend` LEFT JOIN `accounts` AS `Friend1` ON (`Friend`.`account_id` = `Friend1`.`id`) LEFT JOIN `accounts` AS `Friend2` ON (`Friend`.`friend_id` = `Friend2`.`id`) WHERE ((((`Friend`.`account_id` IS NULL) AND (`Friend`.`friend_id` = 'Tim Cook'))) OR (((`Friend`.`account_id` = 'Tim Cook') AND (`Friend`.`friend_id` IS NULL)))) AND `Friend`.`approved` = 0 LIMIT 1000
28 SELECT `Account`.`id` FROM `accounts` AS `Account` LEFT JOIN `friends` AS `Friend` ON (`Account`.`id` = `Friend`.`account_id` OR `Account`.`id` = `Friend`.`friend_id`) WHERE ((`Friend`.`account_id` = Tim Cook OR `Friend`.`friend_id` = Tim Cook) AND (`Account`.`id` <> Tim Cook) AND (`Friend`.`approved` = 1));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 'Cook OR `Friend`.`friend_id` = Tim Cook) AND (`Account`.`id` <> Tim Cook) A' at line 50
29SELECT `Account`.`id`, `Account`.`forename`, `Account`.`surname`, `Account`.`nickname`, `Account`.`email`, `Account`.`password`, `Account`.`dob`, `Account`.`gender`, `Account`.`privacy_level`, `Account`.`nationality`, `Account`.`photo_filename`, `Account`.`fb_uid`, `Account`.`use_fb`, `Account`.`email_hash`, `Account`.`permission_group_id`, `Account`.`status`, `Account`.`disabled`, `Account`.`created`, `Account`.`modified`, `TripLocation`.`id`, `TripLocation`.`trip_id`, `TripLocation`.`start_date`, `TripLocation`.`end_date`, `TripLocation`.`name`, `TripLocation`.`country`, `TripLocation`.`country_code`, `TripLocation`.`geoname_id`, `TripLocation`.`longitude`, `TripLocation`.`latitude`, `UserLocation`.`id`, `UserLocation`.`account_id`, `UserLocation`.`name`, `UserLocation`.`country`, `UserLocation`.`country_code`, `UserLocation`.`geoname_id`, `UserLocation`.`longitude`, `UserLocation`.`latitude`, `UserLocation`.`created` FROM `accounts` AS `Account` LEFT JOIN `trip_destinations` AS `TripLocation` ON (`TripLocation`.`start_date` <= NOW() AND `TripLocation`.`end_date` >= NOW() AND `TripLocation`.`trip_id` IN (SELECT `TM`.`trip_id` FROM trip_members AS TM WHERE `TM`.`account_id` = `Account`.`id`)) LEFT JOIN `user_locations` AS `UserLocation` ON (`UserLocation`.`account_id` = `Account`.`id`) WHERE `Account`.`id` IS NULL GROUP BY `Account`.`id` ORDER BY rand() ASC 000
30SELECT `WishList`.`id`, `WishList`.`account_id`, `WishList`.`name`, `WishList`.`country`, `WishList`.`country_code`, `WishList`.`geoname_id`, `WishList`.`longitude`, `WishList`.`latitude`, `WishList`.`description`, `WishList`.`created` FROM `wish_lists` AS `WishList` WHERE `WishList`.`account_id` = 'Tim Cook' 000
31SELECT `TripMember`.`id`, `TripMember`.`trip_id` FROM `trip_members` AS `TripMember` WHERE `TripMember`.`account_id` = 'Tim Cook' AND `TripMember`.`status` = 0 000
32SELECT `Trip`.`id`, `Trip`.`title`, `Trip`.`description`, `Trip`.`start_date`, `Trip`.`end_date`, `Trip`.`access_level`, `Trip`.`privacy_level`, `Trip`.`photo_filename`, `Trip`.`account_id`, `Trip`.`email`, `Trip`.`created`, `Trip`.`modified` FROM `trips` AS `Trip` WHERE `Trip`.`id` IS NULL AND ((`Trip`.`start_date` <= NOW()) AND (`Trip`.`end_date` >= NOW())) ORDER BY `Trip`.`created` DESC LIMIT 1000
33SELECT `Trip`.`id`, `Trip`.`title`, `Trip`.`description`, `Trip`.`start_date`, `Trip`.`end_date`, `Trip`.`access_level`, `Trip`.`privacy_level`, `Trip`.`photo_filename`, `Trip`.`account_id`, `Trip`.`email`, `Trip`.`created`, `Trip`.`modified` FROM `trips` AS `Trip` WHERE `Trip`.`id` IS NULL ORDER BY `Trip`.`start_date` DESC LIMIT 1000
34SELECT `Trip`.`id`, `Trip`.`title` FROM `trips` AS `Trip` WHERE `Trip`.`id` IS NULL ORDER BY `Trip`.`start_date` DESC 000
35SELECT `TripMember`.`id`, `TripMember`.`trip_id` FROM `trip_members` AS `TripMember` WHERE `TripMember`.`account_id` = 'Tim Cook' AND `TripMember`.`status` = 0 000
36SELECT `Trip`.`id`, `Trip`.`title`, `Trip`.`description`, `Trip`.`start_date`, `Trip`.`end_date`, `Trip`.`access_level`, `Trip`.`privacy_level`, `Trip`.`photo_filename`, `Trip`.`account_id`, `Trip`.`email`, `Trip`.`created`, `Trip`.`modified`, `Account`.`id`, `Account`.`forename`, `Account`.`surname`, `Account`.`nickname`, `Account`.`email`, `Account`.`password`, `Account`.`dob`, `Account`.`gender`, `Account`.`privacy_level`, `Account`.`nationality`, `Account`.`photo_filename`, `Account`.`fb_uid`, `Account`.`use_fb`, `Account`.`email_hash`, `Account`.`permission_group_id`, `Account`.`status`, `Account`.`disabled`, `Account`.`created`, `Account`.`modified`, `FeaturedTrip`.`id`, `FeaturedTrip`.`account_id`, `FeaturedTrip`.`trip_id`, `FeaturedTrip`.`created`, `FeaturedTrip`.`modified` FROM `trips` AS `Trip` LEFT JOIN `accounts` AS `Account` ON (`Trip`.`account_id` = `Account`.`id`) LEFT JOIN `featured_trips` AS `FeaturedTrip` ON (`FeaturedTrip`.`trip_id` = `Trip`.`id`) WHERE `Trip`.`id` IS NULL ORDER BY `Trip`.`start_date` DESC 000
37SELECT `Blog`.`id`, `Blog`.`scoop_id`, `Blog`.`title`, `Blog`.`content`, `Blog`.`photo_filename`, `Blog`.`views`, `Blog`.`rating`, `Scoop`.`id`, `Scoop`.`account_id`, `Scoop`.`trip_id`, `Scoop`.`trip_destination_id`, `Scoop`.`foreign_id`, `Scoop`.`class`, `Scoop`.`pub_date`, `Scoop`.`created`, `Scoop`.`modified` FROM `blogs` AS `Blog` LEFT JOIN `scoops` AS `Scoop` ON (`Blog`.`scoop_id` = `Scoop`.`id`) WHERE `Scoop`.`class` = 'Blog' AND `Scoop`.`account_id` = 'Tim Cook' ORDER BY rand() ASC LIMIT 4000
38SELECT `Photo`.`id`, `Photo`.`photo_album_id`, `Photo`.`scoop_id`, `Photo`.`title`, `Photo`.`filename`, `Photo`.`views`, `Photo`.`rating`, `Scoop`.`id`, `Scoop`.`account_id`, `Scoop`.`trip_id`, `Scoop`.`trip_destination_id`, `Scoop`.`foreign_id`, `Scoop`.`class`, `Scoop`.`pub_date`, `Scoop`.`created`, `Scoop`.`modified` FROM `photos` AS `Photo` LEFT JOIN `scoops` AS `Scoop` ON (`Photo`.`scoop_id` = `Scoop`.`id`) WHERE `Scoop`.`class` = 'PhotoAlbum' AND `Scoop`.`account_id` = 'Tim Cook' ORDER BY rand() ASC LIMIT 4000
39SELECT `Video`.`id`, `Video`.`scoop_id`, `Video`.`filename`, `Video`.`title`, `Video`.`description`, `Video`.`length`, `Video`.`thumbnail_url`, `Video`.`views`, `Video`.`rating`, `Scoop`.`id`, `Scoop`.`account_id`, `Scoop`.`trip_id`, `Scoop`.`trip_destination_id`, `Scoop`.`foreign_id`, `Scoop`.`class`, `Scoop`.`pub_date`, `Scoop`.`created`, `Scoop`.`modified` FROM `videos` AS `Video` LEFT JOIN `scoops` AS `Scoop` ON (`Scoop`.`foreign_id` = `Video`.`id` AND `Scoop`.`class` = 'Video') WHERE `Scoop`.`class` = 'Video' AND `Scoop`.`account_id` = 'Tim Cook' ORDER BY rand() ASC LIMIT 4000
40SELECT COUNT(*) AS `count` FROM `messages` AS `Message` LEFT JOIN `accounts` AS `Author` ON (`Message`.`author_id` = `Author`.`id` AND `Author`.`status` <> 0) LEFT JOIN `accounts` AS `Recipient` ON (`Message`.`recipient_id` = `Recipient`.`id`) WHERE `Message`.`recipient_id` IS NULL AND `Message`.`viewed` = 0 110
41SELECT COUNT(id) AS count FROM `cake_sessions` WHERE `id` = 'e72e664cd5eada79310a4c2acbf2c224'110
42UPDATE `cake_sessions` SET `data` = 'Config|a:4:{s:9:\"userAgent\";s:0:\"\";s:4:\"time\";i:1337517854;s:4:\"rand\";i:293028519;s:7:\"timeout\";i:10;}Message|a:0:{}Auth|a:1:{s:7:\"Account\";N;}', `expires` = 1337517854 WHERE `id` = 'e72e664cd5eada79310a4c2acbf2c224'10