Skip to content
Advertisement

Tag: sql

Access denied for user ‘root’@’localhost’ after installing phpmyadmin on ubuntu

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

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

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.

Advertisement