MySQL and Excel Power Query

I am having trouble connecting to MySQL using Excel Power Query. **DataSource.Error: Object reference not set to an instance of an object. For Server I input “localhost”, and for Database I input “dm_test” which is the name of my schema. Any ideas? Thanks Source: mysql

The user specified as a definer (‘user’@’localhost’) does not exist

As per my application requirement, I have renamed user by String.Format(“RENAME USER ‘{0}’@’%’ TO ‘{1}’@’%’;”, OldUsername, NewUsername) It renamed properly in database. But when I execute next command with renamed(new) user name, it throught The user specified as a definer (‘OldUser’@’localhost’) does not exist error with 1449. I have change connection string also. Please suggest me what I am missing…
Read more

Get content of DIV using javascript, .innerHTML not working?

I currently have a jquery drag and drop, and want to insert the final results in a database. I want to use Javascript to get the values, but i keep getting the result ‘NULL’, instead of the actual content (generated by php/mysql) This is my javascript function getValue() { var ajaxRequest; // The variable that makes Ajax possible! try{ //…
Read more

mysql column select and compare

well now i have a table named user_data and when members register a column which have their informations is added to the table automaticlly as a new row so i am asking for how to compare these column with one i select example: there is currently in the table 40 column a column named kite have these information : email,name,country,facebook…
Read more

How to find the total rows in a database

I had a look at the other topics here on getting row numbers but couldn’t fully understand them. All I need is a way of getting the total number of rows. I have the following code that reads each row and populates a listbox, however as I want to assign that rows value to an array. I need to know…
Read more

Transform date format in mySQL table and sort the result by date

I have a table in a mySQL-Database with inconsistence date format. For example: ID date name 1 01.02.2015 exampleA 2 12.13.2015 exampleB 3 1.11.2015 exampleC Sometimes the date format is d.m.Y and sometimes the format is m.d.Y. I have created this SQL-Statement, which transforms the date colummn of the result in an uniform format: SELECT IFNULL(DATE_FORMAT(STR_TO_DATE(date, ‘%d.%m.%Y’), ‘%d.%m.%Y’), DATE_FORMAT(STR_TO_DATE(date, ‘%m.%e.%Y’),…
Read more

How can I put the value (PENDING) on my column (order_status) using array php

So, I have two tables tb_empgrocery and tb_empgroc_master. When I click order now, the items that I’ve ordered will be saved into the two tables. tb_empgrocery saves all the items each row and tb_empgroc_master reads the each row from the first table and counts items and summarize it. case “Add”: $itemno = $_POST[‘itemno’]; $qty = $_POST[‘qty’]; $unitprc = $_POST[‘unitprc’]; $amt…
Read more

Delete duplicate prefix in phpmyadmin

I need to delete a prefix like this one in a databases r8oi9_ which was made by mistake. (not keeping the original prefix while restoring the website) I want to completely wipe anything with this prefix. I followed the answer posted in that question: SQL: deleting tables with prefix but there was a warning saying: /! This table does not…
Read more

Extract a nested object from a dynamic column field in Mariadb

I created a table with dynamic columns as following in MariaDb: CREATE TABLE items ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, product varchar(100) NOT NULL, data BLOB ); INSERT INTO items (product, data) VALUES (‘test_row’, COLUMN_CREATE(‘colour’, ‘blue’, ‘details’,COLUMN_CREATE(‘key1′,’value1′,’key2′,’value2’)) ); But I am not able to extract the nested object in a JSON format, when I execute the following query…
Read more

PHP If Statement Logic

I am a bit stuck on an if statement on my PHP code. I know this is probably a basic question for most of you out there, but i am stuck, and i would like some assistance. I have 2 variables $max and $ min, which i have to compare with 2 other max and mins called $valor and $minimo…
Read more