Skip to content

Commit

Permalink
edit qurey to select all data like agent info. , estate agent #80
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedsalah7 committed Nov 3, 2021
1 parent fe9a1b3 commit 77d3074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/database/quieres/userEstatesQuiery.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const connection = require('../config/connection');

module.exports = (userId) => connection.query('SELECT * FROM estates WHERE agent_id = $1', [userId]);
module.exports = (userId) => connection.query('SELECT * FROM agents INNER JOIN estates on agents.id = estates.agent_id INNER JOIN images ON estates.id = images.estate_id WHERE agents.id = ($1) ', [userId]);

0 comments on commit 77d3074

Please sign in to comment.