จากการเปิด debug mode พบปัญหาตามรายละเอียดด้านล่างครับผม
[2021-09-11 16:11:52] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:56] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:58] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:58] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:12:00] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
ยังคงพบปัญหาเดิมครับ
[2021-09-11 21:55:22] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-13 23:18:57] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %P00006% OR V.`topic` LIKE %P00006%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
ถ้ายังใช้ไม่ได้จริงๆ และหลังจากคิดว่าตรวจสอบดีแล้ว สามารถส่งข้อมูล Server และข้อมูลที่เกี่ยวข้องมาให้ผมได้ทางอีเมล จะเข้าไปดูให้ (ส่งมาให้ครบนะครับ)
/b> line <b>586</b>
[2021-09-14 08:16:03] INFO: <b>Database :</b> SELECT * FROM (SELECT O.`order_date`,O.`order_no`,C.`company`,(O.`total`+O.`vat`-O.`tax`) AS `total`,O.`id`,O.`customer_id` FROM `cp688576_sky`.`app_orders` AS O LEFT JOIN `cp688576_sky`.`app_customer` AS C ON C.`id` = O.`customer_id` WHERE O.`status` = 'OUT' AND DAY(`order_date`) = 14 AND MONTH(`order_date`) = 9 AND YEAR(`order_date`) = 2021) AS Z9 LIMIT 30<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Kotchasan/DataTable.php</b> line <b>678</b>
[2021-09-14 08:16:10] INFO: <b>Database :</b> SELECT U.* FROM `cp688576_sky`.`app_user` AS U WHERE U.`username` = 'porametsp' ORDER BY U.`status` DESC<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Gcms/Login.php</b> line <b>97</b>
[2021-09-14 08:16:10] INFO: <b>doQuery :</b> UPDATE `cp688576_sky`.`app_user` SET `token`=601ea9b0a1c4b7c66f69b00696bc6396cd4acbd3 WHERE `id` = 1<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Gcms/Login.php</b> line <b>69</b>
[2021-09-14 08:16:12] INFO: <b>Database :</b> SELECT `id`,`name`,`email`,`company`,`phone` FROM `cp688576_sky`.`app_customer` ORDER BY `company`, `name`, `email`, `phone`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>80</b>
[2021-09-14 08:16:12] INFO: <b>Database :</b> SELECT `id`,`name`,`email`,`company`,`phone` FROM `cp688576_sky`.`app_customer` ORDER BY `company`, `name`, `email`, `phone`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>83</b>
[2021-09-14 08:16:18] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค่% OR V.`topic` LIKE %เค่%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:19] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค% OR V.`topic` LIKE %เค%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:20] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก% OR V.`topic` LIKE %เค้ก%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:21] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก% OR V.`topic` LIKE %เค้ก%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:22] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก 2% OR V.`topic` LIKE %เค้ก 2%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:24] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก 2 ชั้น% OR V.`topic` LIKE %เค้ก 2 ชั้น%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
ในกรณีที่ยังแก้ปัญหาไม่ได้ ให้ลองเปิดโหมด DEBUG ดู หากมี error ให้เอา error มาดูครับ
วิธีการเปิดอยู่ในโพสต์ปักหมุด
[2021-09-11 16:11:52] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:56] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:58] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:58] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:11:59] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
[2021-09-11 16:12:00] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
ยังคงพบปัญหาเดิมครับ
[2021-09-11 21:55:22] ERROR: <br>Exception : <em>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'prefix' in 'where clause'</em> in <b>/home/cp688576/public_html/apps/Kotchasan/Database/Driver.php</b> on line <b>309</b>
ไม่สามารถค้นหาได้ครับอาจารย์
[2021-09-13 23:18:57] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %P00006% OR V.`topic` LIKE %P00006%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
https://www.kotchasan.com/forum.html?wbid=3809
อาจจะข้อ 3 (เดานะ เพราะ รายละเอียดที่ส่งมาไม่สอดคล้องกัน และไม่มากพอจะตอบคำถามได้ และ เว็บไซต์ตัวอย่างก็ปกติดี)
ถ้ายังใช้ไม่ได้จริงๆ และหลังจากคิดว่าตรวจสอบดีแล้ว สามารถส่งข้อมูล Server และข้อมูลที่เกี่ยวข้องมาให้ผมได้ทางอีเมล จะเข้าไปดูให้ (ส่งมาให้ครบนะครับ)
/b> line <b>586</b>
[2021-09-14 08:16:03] INFO: <b>Database :</b> SELECT * FROM (SELECT O.`order_date`,O.`order_no`,C.`company`,(O.`total`+O.`vat`-O.`tax`) AS `total`,O.`id`,O.`customer_id` FROM `cp688576_sky`.`app_orders` AS O LEFT JOIN `cp688576_sky`.`app_customer` AS C ON C.`id` = O.`customer_id` WHERE O.`status` = 'OUT' AND DAY(`order_date`) = 14 AND MONTH(`order_date`) = 9 AND YEAR(`order_date`) = 2021) AS Z9 LIMIT 30<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Kotchasan/DataTable.php</b> line <b>678</b>
[2021-09-14 08:16:10] INFO: <b>Database :</b> SELECT U.* FROM `cp688576_sky`.`app_user` AS U WHERE U.`username` = 'porametsp' ORDER BY U.`status` DESC<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Gcms/Login.php</b> line <b>97</b>
[2021-09-14 08:16:10] INFO: <b>doQuery :</b> UPDATE `cp688576_sky`.`app_user` SET `token`=601ea9b0a1c4b7c66f69b00696bc6396cd4acbd3 WHERE `id` = 1<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/Gcms/Login.php</b> line <b>69</b>
[2021-09-14 08:16:12] INFO: <b>Database :</b> SELECT `id`,`name`,`email`,`company`,`phone` FROM `cp688576_sky`.`app_customer` ORDER BY `company`, `name`, `email`, `phone`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>80</b>
[2021-09-14 08:16:12] INFO: <b>Database :</b> SELECT `id`,`name`,`email`,`company`,`phone` FROM `cp688576_sky`.`app_customer` ORDER BY `company`, `name`, `email`, `phone`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>83</b>
[2021-09-14 08:16:18] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค่% OR V.`topic` LIKE %เค่%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:19] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค% OR V.`topic` LIKE %เค%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:20] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก% OR V.`topic` LIKE %เค้ก%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:21] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก% OR V.`topic` LIKE %เค้ก%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:22] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก 2% OR V.`topic` LIKE %เค้ก 2%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
[2021-09-14 08:16:24] INFO: <b>Database :</b> SELECT I.`product_no`,CONCAT_WS(' ', V.`topic`, I.`topic`) AS `topic`,I.`price`,V.`cost`,V.`stock`,V.`count_stock`,I.`unit` FROM `cp688576_sky`.`app_inventory` AS V INNER JOIN `cp688576_sky`.`app_inventory_items` AS I ON I.`inventory_id` = V.`id` WHERE (V.`inuse` = 1 AND I.`instock` = 1) AND (I.`product_no` LIKE %เค้ก 2 ชั้น% OR V.`topic` LIKE %เค้ก 2 ชั้น%) ORDER BY I.`product_no`<br>[4] <b>execute</b> in <b>/home/cp688576/public_html/apps/modules/inventory/models/autocomplete.php</b> line <b>136</b>
ผมไม่แน่ใจว่าได้ทำตามคำแนะนำที่ให้ไปหรือเปล่า เพราะนั่นคือปัญหาส่วนใหญ่ที่เจอ ผมแนะนำให้ทำก่อน
ถ้าจำเป็นต้องใช้โปรแกรม แนะนำให้ส่งข้อมูล Host (และที่เกี่ยวข้องมา) น่าจะแก้ปัญหาได้ตรงจุดกว่า