janvi01 / sql-editor

A web-based application that provides a SQL editor to run queries and display results.
https://sql-editor-online.vercel.app/
MIT License
10 stars 17 forks source link

Query results always show results for CUSTOMERS table. #41

Closed Tajinder-Dhoot closed 10 months ago

Tajinder-Dhoot commented 11 months ago

Describe the bug There are 2 scenarios to reproduce this bug:

  1. User runs query for other tables e.g. Categories, Products or Suppliers. But SQL web app always display results for Customers.
  2. User runs query with invalid table name. But SQL web app display results for Customers table.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://sql-editor-i8d6w7vvc-janvi01.vercel.app/'
  2. Enter query 'select * from CATEGORIES'
  3. Click on 'Run Query' button > Results are displayed for Customers table.
  4. Enter query 'select * from CATEGO'
  5. Click on 'Run Query' button > Results are displayed for Customers table.

Expected behavior For scenario 1: SQL web app must display results for specific table in query.

For scenario 2: SQL web app must display error message.

Screenshots The column names in screenshot should be categoryId, categoryName, description, picture.

results always for customers table

Desktop (please complete the following information):

Tajinder-Dhoot commented 11 months ago

@janvi01 I have the solution ready for PR if it's assigned to me.

janvi01 commented 11 months ago

Hey @Tajinder-Dhoot Thanks for opening the issue. I am not able to reproduce scenario 1. Please can you check once again.

The issue is valid for scenario 2.