PHP USER_NOTICE (1024)

Description

Message:Query Error (1194) : Table 'products' is marked as crashed and should be repaired
SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10
File:/home/vergelijk/domains/system/functions.php
Line:49

Source Code

38     require BASEPATH . 'resources/overbelast.php';
39     die;
40 }
41
42 // execute SQL query, return result
43 function query($sql) {
44
45     global $mysqli;
46     
47     // execute query
48     if (!$result = $mysqli->query($sql)) { // TODO: uitzoeken of mysql_query() = voldoende ivm errors?
49         trigger_error('Query Error (' . mysqli_errno($mysqli) . ') : ' . mysqli_error($mysqli) . '<br />'."\n".'<pre style="color:#000">' . $sql . '</pre>');
50     }
51     return $result;
52 }
53
54 // escape string before insertion into database
55 function escape($str) {
56     global $mysqli;
57     
58     return $mysqli->real_escape_string(trim($str));
59 }
60
61 // escape and quote string for use in SQL query

Backtrace

#0  require() called at [/home/vergelijk/domains/system/errorhandler.php:44]
#1  _errorhandler(1024, Query Error (1194) : Table 'products' is marked as crashed and should be repaired
SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10
, /home/vergelijk/domains/system/functions.php, 49, Array ([sql] => SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10,[mysqli] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[error_list] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[result] => )) #2 trigger_error(Query Error (1194) : Table 'products' is marked as crashed and should be repaired
SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10
) called at [/home/vergelijk/domains/system/functions.php:49] #3 query(SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10) called at [/home/vergelijk/domains/system/functions.php:96] #4 fetchAll(SELECT p.name, p.urlSlug AS url, i.img AS fakeImage, i.alt_tekst, p.lowestPrice AS price FROM products AS p LEFT JOIN img_gallery AS i ON i.id = p.img_gallery_id WHERE p.cms_roles_id = 3 AND p.live = 1 GROUP BY p.EAN ORDER BY p.date_inserted ASC LIMIT 10) called at [/home/vergelijk/domains/applications/index/models/homepage.php:44] #5 HomepageModel->newProducts(3, 10) called at [/home/vergelijk/domains/applications/index/controllers/index.php:9] #6 IndexController->indexAction() called at [/home/vergelijk/domains/system/fc.php:79] #7 require(/home/vergelijk/domains/system/fc.php) called at [/home/vergelijk/domains/deconsolevergelijker.nl/public_html/index.php:34]
Date: Wed, 20 Nov 2019 11:39:57 +0100 URI: / REFERER: none