Category "mysql"

How to get distinct values from a column with all its corresponding values in another column

I have a table table_categories (id INT(11), cname VARCHAR(25),survey_id INT(11)) I want to retrieve the values for the column cname without duplication, that

Req.Params.Token returns undefined

In my code, I have my registration page send out a verification email once the form is filled out and submitted. They receive the link to their email to verify

INSERT INTO MySQL statement failing [closed]

I am dynamically forming MySQL statements in PHP and can't figure out why this one is failing to execute: INSERT INTO users ( `email`, `pa

How to effectively search through MySQL DB with multiple searcheable columns?

I have a table with 60 boolean (TINYINT(1)) searcheable columns. User has possibility of using any subset of the given columns as search condition. Based on tha

mysql copy to another only new records

I have to 2 tables: lang temp: sku|postid|fi|en|ru (15000 records / included 200 full_products records) full_products: sku|postid|fi|en|ru|xx|zzz|aaaa|bb

Get top 10 records from db and record from current log in user

I have table which consist of some data, just I want to show the top 10 ranks from that table and at the last column I want show the rank of the user who login

Removing entries with missing links

I have two tables Number 1: adresse id name Number 2: produkte id anbieter Details: id: int name: string anbieter: int Each anbieter in

Remove records what is not contain in second table

I have to 2 tables: lang_temp (newest data): sku|postid|fi|en|ru (15000 records ) full_products: sku|postid|fi|en|ru|xx|zzz|aaaa|bbb (15200 records) postid

systax error in stored procedures

In php-myadmin . while runnig this query I am getting it like ..Import has been successfully finished, 0 queries executed. (getpaywall.com_2013-06-16.sql) But

Count field, joins, multiple selects

I have three tables. Estimates, Estimate_versions, and customers. Here is some SQL SELECT estimates.id, estimates.estimate_number, estimates.description, est

How can you find a variable length substring in MySQL?

I have several strings defined in a php script: <?php $array = [ 'foobar', 'helloworld', 'applebanana' ]; ?> From those

if statement inside mysql query to determine table to select

I would like to perform a if statment in the middle of a query, I need to find out if oc.product_type == 'clothing' or 'other' If it is clothing, then i need to

Can't connect to RDS instance from EC2 instance

From EC2 instance i-78a8df00, I'm trying to connect to RDS instance mysql.************.us-east-1.rds.amazonaws.com. They are both in the U.S. East region. I add

Use OR operand on BOOL (tinyint(1)) Fields MYSQL

Is it possible to use the OR operand when comparing two boolean values? Using MYSQL 5+ Ex. ON DUPLICATE KEY UPDATE table1.3_InMarket = (table1.3_InMarket OR

Spring Boot SSH Mysql?

I can successfully connect to my openshift mysql through workbench, how do I do the same through my spring boot application? in my application.properties: # C

Combining 2 Tables, Want to keep all Non 0 Bit on DUPLICATE KEY

I have a table with 1000 columns (yes its normalized), that is storing Biiig Daaata! I need to Insert Update new data as it becomes available overnight, and f

Mysqli query for counting number of total friends

When I have a table of users: id | login 1 Mike 2 Janet 3 Bruce And I have a table of friendships called friendlist: id | user | friend 1 1

Select Values based on Distinct Dates

I am puzzled for a while now. I have a table with phone numbers and dates(Timestamp). If a number exists more than once for a particular date, the number should

Get exact time for date mysql

How could I make a query that returns the date of today in addition to the specific hour as '2013-05-12 08:00:00'.. I'd like to make it dynamically, so how coul

'No compatible servers were found' error message

When I install the MySql Workbench, it show this message: No compatible servers were found. You'll need to cancel this wizard and install one. But I beli