Posts by Danrley Fernandes Lopes • 1 point
3 posts
-
0
votes1
answer120
viewsQ: Error while creating table
I have a users table and a friendship table, a friend is also a user and when I add a user as a friend he also has to be my friend, now that the concept is clear, I would like to know how to create…
mariadbasked Danrley Fernandes Lopes 1 -
-2
votes1
answer740
viewsQ: Delete table record with foreign key
Where is the Error? DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0; Clarifications: p_id = id of posts(primary key) u_id = user id(foreign key)…
-
0
votes1
answer41
viewsQ: Doubt about Mysql Query
What code is required to display all a user’s posts? I did something like this in PHP: "SELECT * FROM postagens WHERE id='$p_id' AND u_id='$u_id';"; But always returns 0 lines :( CREATE DATABASE IF…