From 01b632ed21a8404957d9a344ef06015c0982a666 Mon Sep 17 00:00:00 2001 From: omkieit Date: Sun, 22 Sep 2024 20:55:05 +0530 Subject: [PATCH] done --- ef-api/controllers/mysqlproperty.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ef-api/controllers/mysqlproperty.js b/ef-api/controllers/mysqlproperty.js index 78071a2..a76ebc0 100644 --- a/ef-api/controllers/mysqlproperty.js +++ b/ef-api/controllers/mysqlproperty.js @@ -1,5 +1,5 @@ import mysql from "mysql2"; -// import pool from "../db/db.js"; +import pool from "../db/db.js"; const db = mysql.createConnection({ host: "db-mysql-nyc1-99306-do-user-12431193-0.b.db.ondigitalocean.com", @@ -102,15 +102,10 @@ export const searchMySQL = (req, res) => { // Controller function to search for MYSQL properties by house_id export const PropertiesMysqlView = async (req, res) => { const { house_id } = req.params; - console.log("hu", house_id); + // console.log("hu", house_id); try { - const query = ` - SELECT * - FROM home_information - WHERE house_id = ? - `; - + const query = `SELECT * FROM home_information WHERE house_id = ?`; const [rows] = await pool.query(query, [house_id]); if (rows.length > 0) {