This is sample query to delete record from multiple tables.
Specify all joined tables to get the list but can specify records in which tables to be deleted.
DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.id;
DELETE FROM t1, t2 USING t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id=t2.id AND t2.id=t3.id;
https://dev.mysql.com/doc/refman/8.0/en/delete.html (refer section – Multi-Table Deletes)
Got this error while importing csv to table in MySQL database using sequel pro.
This error normally because of extra space in field name that mysql cannot accept.
But sometimes you just can’t find where is the extra space.
One way to solve is add additional column, when import, just ignore the last field and you can import it as usual.
To build a foolproof and super easy to maintain system must be a goal for a system development.
To get to that, it has to have
- clear naming standard and convention. e.g. no $i or $anumber kind of variable
- clear and easy to read code structure
- many small and structured files over one huge file
- heavily tested before deploy to live server and start being used by the users
- good database design to cater for growth
- good settings and configurations either on files or database so it is flexible
Asana is a proficient tool to manage tasks in a small team.
Below is the suggested workflow to be followed
- Task created by manager or assignee (if the task is assigned offline or via other medium)
- Assign to assignee
- Assignee comment “in progress” when start processing a task
- Assignee and manager communicate in comments for particular task
- To add “follower” if need some other people to be in the loop
- Assignee assign to manager back once the task complete for verification before can be marked as complete
- Manager will verify, set as complete and set the assignee back for record as person who has done the job. Or if it is not complete, task will be assigned back to the assignee
I’ve listed out some related to PDF read and search resources down here for my future reference.
Read DOC file
Transaction feature suitable to be used in 2 conditions.
- If you have multiple statements to run and want to ensure all of them run successfully to conclude the task.
- If you want to run a delete command, and want to ensure everything is ok before commit.
How to use
run TRANSACTION or BEGIN command
then run other statement as usual
then you have option to ROLLBACK; or to COMMIT;
SQL to check a value exist in one table but not in another.
FROM table1 t1
LEFT JOIN table2 t2 ON t2.name = t1.name
WHERE t2.name IS NULL
or this (not tested)
WHERE NOT EXISTS (SELECT 1
WHERE A.ID = B.ID)
Basic git flow
from remote “master”, create a branch “develop”.
pull branch “develop”
branch out branch “feature” or “bug” from local “develop”
commit changes to branch”feature”
push branch”feature” to remote branch”feature”
request merge to remote branch “develop”
after merged, pull branch “develop” to local
Some free tools can be used to build a simple and quick websites
- Elementor (wordpress plugin)
- Mobirise (desktop application)
Other wp plugins
- wp page builder
- live composer
Billplz is a malaysian’s payment gateway. It’s free to register, easy to setup and affordable.
Register free here
If you are using postman to test, add the API Key as username in Authorization tab. Choose “Basic Auth” in Type dropdown. Then enter the URL and params as usual