Select 2 unique column in a query

How can I build a query with records such that 2 columns are unique? This is my attempted code: Select x.a, y.b from table1 x, table2 y where =; 1 - a 2 - b 3 - a 4 - b 5 - c 1 - c 6 - a 2 - a should return this: 1 - a 2 - b 5 - c But t...
more »

2017-02-14 17:02 (3) Answers

Receive SMS from numbers stored in a database

I have a database of numbers that its users on the app store. I want to get a SMS that comes only from these numbers. Basically what I should do? Please help me.Thank you. DatabaseHelper: public class DatabaseHelper extends SQLiteOpenHelper { pu...
more »

2017-02-14 11:02 (2) Answers

SQL Server Missing Backups

I'm trying to get a list of missing full backups, but I need this list to show me which user performed the latest backup. The problem is, I don't know how to filter that, since what I'm querying is returning all the last backups for each user. Examp...
more »

2017-02-14 03:02 (1) Answers

storing feet/inches in DB

I have many different strings with feet/inches like this: 10 feet and 8 1/4 inches 7 feet and 4 3/8 inches I need to store it to DB (I use MS SQL) How to do it the best way? I see the following approaches: store separately. One field for feet, ...
more »

2017-02-13 18:02 (2) Answers

Laravel Change Connection Dynamically

How to change laravel's connection form controller but the connection information stored at database like database manager, my example : I have a databases information on my database : id, driver, database_name, username, password, host so at my ...
more »

2017-02-13 07:02 (1) Answers

Swapping of record/row in Mysql PHP

I have participant table in mysql. For example the table data is like this For example, there is a mistake. Ignit must be in 4th position. If I swap Donald to Ignit, it will become like this which is wrong : So, I'm going to swap one by one Ig...
more »

2017-02-13 07:02 (1) Answers

Count Length of Digits Per Column Per Row

I generated the following table: CREATE table user ( user_id INT NOT NULL UNIQUE AUTO_INCREMENT, user_phone_number INT, user_city VARCHAR(32) NOT NULL, PRIMARY KEY (user_id) ); And I'm being asked the following: number of u...
more »

2017-02-13 03:02 (1) Answers

SQL - PostgreSQL - Find gaps in booking calendar

I am currently setting up a web based system to allow users to find availabilities of boats in a calendar. I am using PostgreSQL 9.6 A user should be able to say I want to find a boat available for three hours in the next three months between 08h00...
more »

2017-02-12 14:02 (2) Answers

Connecting Java to MS Access using JCreator

I'm still new to this. But, I'm having a problem inserting data in mt database. I think there's a lot of mistakes going on in my script import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.sql.Connection; import java.sql.Dri...
more »

2017-02-12 09:02 (1) Answers

C# Creating and Populating an Oracle Database

To start i don't have access to the database, we hit a problem with our university account and waiting for it to be reset. How ever i do have code that is giving me some problems and frankly i'm not sure i have even gone about this in the right way. ...
more »

2017-02-11 17:02 (3) Answers

How do models work in CakePHP 3?

Recently I was given a work on a project that is being made in CakePHP 3. The project has some basic function working already and I was asked to create some new functionalities. My understanding of PHP and MVC comes from CodeIgniter, where I have us...
more »

2017-02-11 12:02 (1) Answers

Search firebase by Child of child value

I have a firebase database structure similar to this Is it possible to query by the email address say "" and retrieve both the keys "1248769d7j8" as well its parent "deaf7834jd8d7j-78" ? The solution I have is to make the database structur...
more »

2017-02-11 06:02 (1) Answers

how to Search Data on firebase database in android

I want to make an application that will allow users to buy and sell Items, and this application should use Firebase. It will use Firebase storage for the images uploaded by the users and use Firebase database to store the products description. My que...
more »

2017-02-10 22:02 (0) Answers

python- mysql error when I use %s in execute

I have to delete some dates from mysql by python. I have tables over 2000. so, I need to finish this code... I can't handle this much by clicking my mouse. I really need help. well, my guess was like this sql ="delete from finance.%s where date='2...
more »

2017-02-10 08:02 (2) Answers

json_decode returning NULL [{},{}]

I'm pulling information from our database (entered with GLua) with PHP, then using json_decode to change it to an array to work with but it's returning NULL, whereas other ones are working? // Get the RapSheet info from 'character_data_store' $rap =...
more »

2017-02-10 01:02 (1) Answers

Postgres CREATE EXTENSION All Databases

I've got postgres installed in multiple environments. In each of those environments, I have 2+ databases. If I have superuser database rights, is there a way to install the CITEXT extension for all databases on a given postgres install? As of righ...
more »

2017-02-09 15:02 (1) Answers