Posts by Building the Future • 1 point
4 posts
-
0
votes2
answers54
viewsA: Only one line as true, MYSQL - Codeigniter
Create a Trigger to act before select to update all that are true so when insert the new it will come as TRUE. CREATE TRIGGER BEFORE INSERT ON Tb_account FOR EACH ROW BEGIN UPDATE tb_account SET…
-
0
votes3
answers153
viewsA: Get the sum of authors' books with Mysql
As you want to bring quantity of purchases only from table cart_de_compras Voce can use command. select id_user,sum(id_book) as qtd_books from cart_de_compras group by(id_user); so it sums all…
-
0
votes4
answers450
viewsA: UPDATE WITH SELECT AS A CONDITION
You have to update with Join between the login table and the user table on id of the user table = id of the login table(user id) ai you give a set a.confirmed = 1 where the login b.(which is the…
-
-2
votes3
answers162
viewsA: Syntax error in Mysql
Put it like this and see if you can. USE cadastro; CREATE TABLE países( cod_pais INT NOT NULL AUTO_INCREMENT, nome_país VARCHAR (30), PRIMARY KEY (cod_pais) );…