MySQLdb error local variable referenced before assignment (different than usual)

MySQL
I am attempting to add some data to MySQL database via a loop that iterates through the API that returns a JSON file. I am using Python and MySQLdb mo...
2 years ago

Eliminating Sub query in MySQL

MySQL
I have a table in MySQL as below. CREATE TABLE `myTable` ( `id` int(11) NOT NULL AUTO_INCREMENT, `employeeNumber` int(11) DEFAULT NULL, `appr...
2 years ago

SQL lower() on one side of WHERE statement works for part of result but not all?

MySQL
I will happily take an edit on the title - I have no clue what to call this. Basically, I'm looking for an explanation to something I just came across...
2 years ago

what is wrong with this query? I am trying to update a column value based on the value of a column in a second table

MySQL
So I am trying to update the value of column Proveedor_Logo in table Natan_Procesos with the value of column Proveedor_Logo in table Natan_Proveedor w...
2 years ago

MySQL Query 2 Tables Join Column beside

MySQL
I have 2 tables, called tb_compulsory_savings and tb_time_deposits for tb_compulsory_savings form_no | badge_id | compulsory_savings | transaction_d...
2 years ago

Insert data into Wordpress database yable from a custom form

MySQL
I am trying to insert data into Wordpress database by creating a table. I have created the table but when I try to insert the data from form, it does ...
2 years ago

Mysql : I need to search record where searched text is matched with third word

MySQL
I need to search record where searched text is matched with third word from database record. Example : Suppose i have three records in description fi...
2 years ago

Insert ArrayList into MySQL

MySQL
I trying to insert ArrayList into MySQL, but I only gets the last values in column selected_seats. The variable list holds value 2 and 3. When I check...
2 years ago

Best practices for efficiently storing md5 hashes in mysql

MySQL
Possible field types: BINARY(16) CHAR(32) BIGINT + BIGINT How do I decide which one to use? ...
2 years ago

Error SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=#

MySQL
I am facing a problem with my query ... SELECT keywords.keyword, keywords.keyid, sources.s_title, sources.s_disc, sources.s_link, sources.sourceid,...
2 years ago

Is it possible to return string values from a query when using Entity-Framework?

MySQL
So far I know two ways to query the database. One of it is by using MySQL's Libraries; By declaring "MySqlCommand", "MySqlDataReader", "MySqlConnectio...
2 years ago

mysql to json using php. Nested objects

MySQL
Good Afternoon, I am trying to get these results into arrays in PHP so that I can encode them into json objects and send them to the client. The resul...
2 years ago

Mysql Mathematics on the fly

MySQL
I am doing a migration from one database structure to another where there are rating values in a column. In database table A the rating is 0-10 in d...
2 years ago

MySQL COUNT values fo each column

MySQL
I’m trying to figure out how to count the values in more than one column. It seem the first COUNT I do gives me the correct results but everything I’v...
2 years ago

Query returning null on a column with info

MySQL
I've got a few different tables, one is hotel and contains information in regards to a chain of hotels, and another is room which contains information...
2 years ago

Join two tables in a MySQL query

MySQL
I am new to PHP and MySQL and I am having trouble understanding JOIN. I think, for me, the problem lies with actually understanding the logic of the q...
2 years ago

Laravel Conditionally join tables based on specified class

MySQL
I have three tables customers, organizations and contacts. Table customers table has columns customer_class (the class indicates table use Organizatio...
2 years ago

Fetch mysql data from PHP using radiobutton control

MySQL
I would like to manipulate PHP code to search for specfic data in the sql database that matched. For example, let's say I want to search for an IP ma...
2 years ago

SQL SELECT DISTINCT Not functioning

MySQL
I have a selector were I wish users to only see distinct 'items' from a table. Below I have code to loop through the results. If I change the query to...
2 years ago

MIN/MAX vs ORDER BY and LIMIT

MySQL
Out of the following queries, which method would you consider the better one? What are your reasons (code efficiency, better maintainability, less WTF...
2 years ago