Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have an ecommerce website, using Laravel and mysql. I need to auto change the currency based on the client country.
I already have the selection based currency change. I need to auto change the currency to the one of the user's country when visiting the website.
We have a laravel package called Torann/laravel-geoip for this purpose.
Add below snippet after finished installing this lib;
$geoData = geoip(request()->ip());
$currency = $geoData['currency'];
For more details, see this link; https://lyften.com/projects/laravel-geoip/doc/
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I was given instagram database with some records and have 7 tables as follows:
Tables--
I am using MYSQL
I have a requirement check the User who have not posted a single photo using sql in MYSQL.
Any help will be appreciated
I tried to get details from Photo table using the query:
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
how to retrieve a particular row from MySQL database and to use them in react native?
Okay, suppose you get an array of responses from the api call in backend (i.e php) , like [{"id":"1","cus_name":"k","cmpny_name":"k","gst_no":"k","mob_no":"k","user_id":"k","password":"k"}]
So suppose youget response in a variable eg
response = [{"id":"1","cus_name":"k","cmpny_name":"k","gst_no":"k","mob_no":"k","user_id":"k","password":"k"}]
Now to extract id of first element just do ,
response[0]['id'] , and this will give out the value 1. coz id is 1.
Hope it helps. feel free for doubts
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm developing an airline reservation system as my semester project. Here, when one customer books a seat in a specific aircraft, I need to prevent another customer from booking that seat at the same time. I know how to do this in back-end level using synchronization. I need to know whether there is a way to do this in database level. If so, could you please point me in some direction
You can create unique constraint for 2 columns in table like (flight_id, seat_id)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to display the list of staffs who check into work late in a week. For example the staff checks in at 8.10 when the supposed check in time is at 8.00 AM. I am using datetime for the datetimein and datetimeout field. Can anyone suggest how should I do it?
Well, with no sample tables to work from, it's hard to give a clear answer. But I think what you're looking for is the TIME() function.
This should get you started in the right direction:
SELECT * FROM timeclock_records where TIME(datetimein) > "08:00:00";
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Here im going to create a database in phpMyadmin.it shows this is not a number error.Here i have attached the image.When im going to save it shows
This is not a number!
You have to enter length for IsActive as it is of type BIT. In Mysql BIT field requires a length to be assigned.
For more details about Data types and their lengths , check out this page
http://www.tutorialspoint.com/mysql/mysql-data-types.htm
http://www.peachpit.com/articles/article.aspx?p=30885&seqNum=7