Answer the question
In order to leave comments, you need to log in
How to change data in database via sql?
The site database on dle has a news id column. You need to change the category column using sql, there are already values there 124,123
, one more value ,125.
, with a given value id = 1357912
.
Answer the question
In order to leave comments, you need to log in
UPDATE dle_post SET category = CONCAT( category, ',125' ) WHERE id = 1357912
$sql = $db->query("SELECT 'category' FROM 'dle_post' WHERE 'id' = '10624' ");
while( $row = $db->get_row($sql) ) {
$add_cats = ",125";
$sql1 = $db->super_query("UPDATE 'dle_post' SET 'category' = "{$row['category']} . {$add_cats} " WHERE 'id'`' = '10624' ");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question