I installed phpmyadmin on my ubuntu server following these steps here: https://www.rosehosting.com/blog/install-phpmyadmin-on-ubuntu-16-04/ I installed apache, php, mysql following these steps: https://vijayasankarn.wordpress.com/2017/01/17/setting-lamp-stack-in-ubuntu-16-04-using-aws-ec2/ and when I goto login to http://myserver.com/phpmyadmin I get this error: mysqli_real_connect(): (HY000/1045): Access denied for user ‘root’@’localhost’ (using password: YES) What am I doing wrong? Am I missing a step that is not in the links above? I
Tag: sql
SQL statement stores all results in first item of array
I am running a select statement in which it brings back multiple items of the field ‘task_name’ from records that contain a matching ‘username’ field to a PHP variable above called ‘$user_log’. $…
Use a boolean function to determine the results in Laravel query builder
I have shops that open at a specific time and close at a specific time and I want to filter these stores according to a time period specified by the user so that all the returned shops will be …
How to ignore all fields which are empty in pic column?
All with empty fields in pic column should be ignored. (Even Name/Address shouldn’t be visible) Answer If the pic column contains null then add WHERE pic IS NULL to your select. If it is simply empty then use WHERE pic = ”. or
using “INSERT INTO” statement in php code doesn’t work
I’m trying to build a database for a bookstore with 3 tables: Book, Volume and Publication. I’m using mysqli() and the code neither works nor echoes any errors. Answer The problem is that you are checking with === TRUE. As PHP Manual says: Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() will return a mysqli_result
Remove duplicated imported orders in Woocommerce
I have duplicate orders in Woocommerce and I would like to delete them to only keep unique for clean bookkeeping. I am not good at SQL, I wrote this request but it lists both duplicate when there is a duplicate. which gives me 307 results. How can I write the right request to delete the duplicates and only keep unique
how do I convert an array from a form into a database using PHP and Mysql
I am having some trouble figuring out how to get my array that I got from an input field. so what works and i get my array showing on which ones I have chosen my problem is that when I add the $…
Select active data by order
I have 2 tables posts and categories, There is one-to-many relation between both tables. Here are the two tables: There is a relation between category_id and c_id, So that the category_id in the posts table refers to the category id c_id. The post_order and c_order are used to order both posts and categories. And the post_active and c_active are used
Send PHP Error if No Rows Created
I’m trying to prevent duplicate rows from being created. My current statement works, meaning it prevents duplicates from being created, but it always returns the execution as a success, meaning I don’t get an “error” message if no rows were created. Thanks I would like to fail the sql execution if nothing was created, which isn’t done in this case.
How to display messages from the database on left and right?
‘I made a simple chat box with php but the problem is i want to display my messages on the right and the other user messages on the left i made two while loops but they didn’t work. My table is like this (Sender – reciever – msg) I want to display each message ordered by time and on different