I am having trouble when using vsprintf instead of sprintf to format a query string I pass to DB::select. I have narrowed the problem down through elimination. At first I attempted to use sprintf to …
Tag: mysql
WordPress get_var query
I have created some custom tables within the WP database, and I’m referencing a table called ‘projects’ in this instance with this query. ‘pr_no’ is the Project Number
I want to get ranking number in Laravel
I want to get ranking number in Laravel. DB is here. id Bigint name string point BigInt ….. I want to get ranking number in point column. What should I do? now code is this. User::where(‘id’, 1)…
Displaying database information on different page after clicking button
I am using php and mysql to display all the user information of different users and i have a button which gets the id which will be redirected to another page and the id will be displayed in the url. …
Connection refused for connecting with MySQL server using php in XAMPP(MacOS)
I am new to database. I was trying to connect mysql server with php code. But I don’t know why I am getting error for connection.(I tried in windows changing the “localhost:8080” to “localhost” and it worked perfectly.) MyCode: Refused Warning: XAMPP Port: Answer localhost:8080 i…
Javascript and PHP quiz based on the questions which are in the database
I’m developing an online quiz that would let the user answer questions by clicking on a few radio buttons. I want the program to use the questions that are in the database. I’ve already created the …
docker-compose: cannot access to phpMyAdmin from my LEMP stack
I just created a LEMP stack (Linux, Nginx, MariaDB, PHP-FPM) with docker and docker-compose. But somehow, I cannot access to my database trough phpMyAdmin. When I’m trying to reach the phpMyAdmin web-…
PHP MySQL Grouping Issue
If I have a table with the following data in MySQL: Company CompanyEntity OrderNumber Delivery Date Deeway HS 20779 4608580 2020-11-11 Deeway …
Laravel joining tables in a database query
I have this code: $classic_games_money = DB::table(‘bets’) ->where(‘user_id’, $this->user->id) ->sum(‘price’); It displays the amount of income, but i need to display this …
MySQL Date between query [closed]
Why BETWEEN ‘2020-02-22 00:00:00’ AND ‘2020-02-22 23:59:59’ is working (getting Data)? AND why BETWEEN ‘2020-02-22’ AND ‘2020-02-22’ is not working (Not getting Data)? Edited: Got it. I forgot to …