1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[User Error] Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.ID NOT IN (,,) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10 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 ',) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10' at line 1
GET /admin/assets/?isDev=1

Line 400 in /home/content/m/a/t/mattpetworld/html/sapphire/core/model/MySQLDatabase.php

Source

391 	}
392 	
393 	function databaseError($msg, $errorLevel = E_USER_ERROR) {
394 		// try to extract and format query
395 		if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
396 			$formatter = new SQLFormatter();
397 			$msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
398 		}
399 		
400 		user_error($msg, $errorLevel);
401 	}
402 }
403 
404 /**
405  * A result-set from a MySQL database.
406  * @package sapphire
Trace

Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.ID NOT IN (,,) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10 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 ',) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10' at line 1 
Line 400 of MySQLDatabase.php
MySQLDatabase->databaseError(Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.ID NOT IN (,,) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10 | 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 ',) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10' at line 1,256) 
Line 102 of MySQLDatabase.php
MySQLDatabase->query(SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.ID NOT IN (,,) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10,256) 
Line 120 of DB.php
DB::query(SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.ID NOT IN (,,) AND (ClassName = 'File' OR ClassName = 'Image')) ORDER BY Title LIMIT 0,10) 
Line 426 of SQLQuery.php
SQLQuery->execute() 
Line 421 of TableListField.php
TableListField->sourceItems() 
Line 265 of ComplexTableField.php
ComplexTableField->FieldHolder() 
Line 46 of AssetTableField.php
AssetTableField->FieldHolder() 
Line 453 of Folder.php
Folder_UnusedAssetsField->FieldHolder() 
call_user_func_array(Array,Array) 
Line 408 of ViewableData.php
ViewableData->XML_val(FieldHolder,,1) 
Line 73 of .cache.home.content.m.a.t.mattpetworld.html.sapphire.templates.TabSetFieldHolder.ss
include(/tmp/silverstripe-cache-home-content-m-a-t-mattpetworld-html/.cache.home.content.m.a.t.mattpetworld.html.sapphire.templates.TabSetFieldHolder.ss) 
Line 354 of SSViewer.php
SSViewer->process(TabSet) 
Line 773 of ViewableData.php
ViewableData->renderWith(TabSetFieldHolder) 
Line 62 of TabSet.php
TabSet->FieldHolder() 
call_user_func_array(Array,Array) 
Line 408 of ViewableData.php
ViewableData->XML_val(FieldHolder,,1) 
Line 69 of .cache.home.content.m.a.t.mattpetworld.html.sapphire.templates.Includes.Form.ss
include(/tmp/silverstripe-cache-home-content-m-a-t-mattpetworld-html/.cache.home.content.m.a.t.mattpetworld.html.sapphire.templates.Includes.Form.ss) 
Line 354 of SSViewer.php
SSViewer->process(Form) 
Line 773 of ViewableData.php
ViewableData->renderWith(Array) 
Line 980 of Form.php
Form->forTemplate() 
Line 424 of ViewableData.php
ViewableData->XML_val(EditForm,,1) 
Line 983 of ViewableData.php
ViewableData_Customised->XML_val(EditForm,,1) 
Line 33 of .cache.home.content.m.a.t.mattpetworld.html.cms.templates.Includes.AssetAdmin_right.ss
include(/tmp/silverstripe-cache-home-content-m-a-t-mattpetworld-html/.cache.home.content.m.a.t.mattpetworld.html.cms.templates.Includes.AssetAdmin_right.ss) 
Line 354 of SSViewer.php
SSViewer->process(ViewableData_Customised) 
Line 773 of ViewableData.php
ViewableData->renderWith(Array) 
Line 484 of LeftAndMain.php
LeftAndMain->Right() 
call_user_func_array(Array,Array) 
Line 408 of ViewableData.php
ViewableData->XML_val(Right,,1) 
Line 983 of ViewableData.php
ViewableData_Customised->XML_val(Right,,1) 
Line 71 of .cache.home.content.m.a.t.mattpetworld.html.cms.templates.LeftAndMain.ss
include(/tmp/silverstripe-cache-home-content-m-a-t-mattpetworld-html/.cache.home.content.m.a.t.mattpetworld.html.cms.templates.LeftAndMain.ss) 
Line 354 of SSViewer.php
SSViewer->process(ViewableData_Customised) 
Line 166 of Controller.php
Controller->handleAction(HTTPRequest) 
Line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest) 
Line 122 of Controller.php
Controller->handleRequest(HTTPRequest) 
Line 277 of Director.php
Director::handleRequest(HTTPRequest,Session) 
Line 121 of Director.php
Director::direct(/admin/assets/) 
Line 118 of main.php