Algorithm


  1. Update words table
  2. After joining categories table
  3. Change words image column after replacing some value

Code Examples

#1 Code Example with MySQL

Code - MySQL


UPDATE words 
JOIN categories ON categories.id = words.chapter_id
SET words.image=CONCAT(categories.slug, "/", words.en, ".jpg")
Copy The Code & Try With Live Editor
Advertisements

Demonstration


 Test MySQL Online - https://devsenv.com/page/run-mysql-programming

 

Update MySQL table column value after Joining two tables