Post List

Add A New Post

Post
Showing 3 out of total 78
Caught unhandled error "SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
Author : hou Publish Time : 04 Mar 2023 01:17:54

Caught unhandled error "SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`databaseSql`.`#sql-16c3d_3eb`, CONSTRAINT `mt_image_foreign_product_id_64022a2c8b585` FOREIGN KEY (`product_id`) REFERENCES `mt_product` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)" while building "Cycle\ORM\SchemaInterface".

 

select * from mt_image where product_id not in (select id from mt_product)

delete these records product id not in table product

TCPDF Undefined variable $cellspacingx
Author : hou Publish Time : 05 Feb 2023 21:02:39

    "type": "Yiisoft\\ErrorHandler\\Exception\\ErrorException",
    "message": "Undefined variable $cellspacingx",
    "code": 2,
    "file": "vendor/tecnickcom/tcpdf/tcpdf.php",
    "line": 18276,

php array_multisort Array sizes are inconsistent
Author : hou Publish Time : 02 Feb 2023 15:03:34

ajax return error

string(28) "Array sizes are inconsistent"
{"status":"failed","msg":"updating cart failed","data":null}

 

this is my code 

$sortColumn = array_column($carriers, 'shipping_cost');
 
array_multisort($sortColumn, SORT_ASC, $carriers);