5
votes
Accepted
Delete records in different tables
You can't ordinarily delete from more than one table in a single T-SQL DELETE statement.
It is possible to achieve the same effect using triggers or cascading foreign keys with an ON DELETE CASCADE ...
2
votes
MariaDB table is broken after failed dump process
XAMPP(V.3.2.2) is really old. As is MariaDB 10.1.10 (Dec 2015) which it includes. The entire 10.1 series is now unsupported by the upstream MariaDB.
Recommend:
A physical copy of C:/xampp/mysql/data ...
2
votes
mysqldump: Got error: 2002: "Can't connect to MySQL server on 'x' (code)" when trying to connect
mysqldump -e -uNAME -pPWD -hHOST DATABASENAME > C:\winhostMySqlD.sql
I hope you gave this command for representational purpose, if you execute this command as it is, you will get an error. Below ...
2
votes
Accepted
Insert rows in 3 tables in a single query, SQL SERVER 2008
If your reason is to save space in your PHP, you might can use a Stored Procedure for this. Example below:
CREATE PROCEDURE dbo.InsertUserStuff
@UserIndex INT,
@SkillPoint INT,
@TotalSkill ...
1
vote
Accepted
How to calculate quantity based on a boolean field and retrieve values from a JSON field in MySQL
CREATE TABLE price_options (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
slots BOOLEAN,
quantity INT,
list_slots TEXT NULL
);
INSERT INTO price_options (slots, quantity, list_slots)
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
xampp × 30mysql × 18
mariadb × 12
phpmyadmin × 7
linux × 3
php × 3
database-design × 2
innodb × 2
stored-procedures × 2
errors × 2
erd × 2
root × 2
sql-server × 1
sql-server-2008 × 1
sql-server-2008-r2 × 1
restore × 1
locking × 1
mysqldump × 1
memory × 1
json × 1
mysql-workbench × 1
pivot × 1
delete × 1
recovery × 1
array × 1