I have a database created with location updates and in the database there is a bunch of locations x and y. and in the second method readFirestore() reads the location data and compares the favorite …
Tag: mysql
Searching database using `LIKE` and `MATCH AGAINST` in MySQL
I have a table in my database called pro_search where I have translated the meta information for different products in different languages. My table structure is like so:id pro_id en de es fr …
Joining 4 tables resulting an empty result
I have 4 tables with this detail on each table deli_order Table order_code | code | plat_create_time | status OC001 C001 2019-04-14 Success OC002 C002 2019-04-14 Success …
Add column with yesterday sale information on a daily sales database
I’m working with a database that contains daily sales information of different products and stores. StoreSku Date UnitsSale A-2134 20/04/2019 2 A-2135 20/04/2019 1 A-2134 …
How do I keep my “validity” row always updated in relation to my “expiration date” row?
This is my database’s survey table: I learned to use CURDATE() and DATEADD(), so the table can now automatically calculate the survey_date and its expiration_date. But I’d also like to add a value …
Laravel 5.8 / Mysql: Cannot delete or update a parent row a foreign key constraint fails
I am trying to setup my tables in my MySQL database and and I am currently creating migration files using Laravel 5.8. When I run a fresh migration with php artisan migrate all the migrations run …
Mysql add variable value to result set inside stored procedure instead subquery
This is subquery working fine with required result, now I am writing a stored procedure for the same results. I want to use in stored procedure logic as Declare variables Set them use in …
Use replace with interval in sql query
I want to show if 0 it will put a word, perm for example and if not 0 it will get the normal date using interval. Tried to include it in replace. REPLACE(REPLACE(usetime,0,’PERM’), add_time + …
Find How many minutes a month has: MySQL
Say I have a column Date 23-03-2019 04-04-2019 I want to find hoe many minutes the whole month has in MySQL. Expected output: Date MinsinMonth 23-03-2019 44640 04-04-2019 …
SQL many to many
I have fivetables here: User +——–+———-+ | stu_id | batch-id | +——–+———-+ | 1 | 1 | | 2 | 1 | | 3 | 1 | +——–+———-+ subject_id +-…