I am trying to use a simple SQL statment with the LIKE operator. This SQL statement works on SQL developer but not when I try it on PHP. SELECT * FROM hotels WHERE lower(name) LIKE ‘%luxury%’; …
Tag: database
How to get list of movies based on genre and language
I have stuck to get list of movies based on genre and language. Here’s my database structure: movies table ———————– id | title| ———————- 1 | ABC 2 | PQR 3 | MNC …
Decimal value gets rounded when entering DB
I’m trying to upload a decimal value into a database. Before the upload (while debugging C#) it’s decimal but when inserted to the database it’s the decimal is rounded so there aren’t any numbers …
How to insert multiple rows in a SQL Database
I’m developing a Recipes Book and I’ve a problem saving multiple Ingredients for the same Recipe in the database. I can add, pressing a button, multiples Linear Layout with inside an ingredient …
Is there any other way to extract the number of exam?
Hello everyone I have a problem that I need help with I’m trying to get number of exam for specified student we have three tables : etudient (N_Appoge,Nom,PRENOM,filiere,….) module (NUM_Module,…
MySQL select a certain amout of rows for each type in a certain c
I would like to select the first certain number of rows, by groups of a certain column. For example : Original data: index type value 0 1 a 0.716430 1 2 a 0.223650 2 …
how to select non repeated date intervals?
My products table, year 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 2003 2002 2001 2000 My Query, SELECT dt||’-‘||dt1 FROM (SELECT year as dt, year+4 as dt1 FROM products GROUP BY …
How can I get data using if else in laravel elequent
Suppose I have a Salary model contains column of month and year I want to fetch data like Salary::where((year==date(‘Y’) && month<date('m')) || yearget() How can I …
How can I apply mutliple filters on my sql tables
I am struggling with what looks to be relational division in sql. I need to filter data from the same table based on multiple criteria. Here-under is a schema of what my table looks like. | ——-|–…
Is a non-clustered index implicitly created for each foreign key in a table?
If I have a table like so: CREATE TABLE MyTable ( Id INT PRIMARY KEY IDENTITY(1, 1), FooId INT NOT NULL FOREIGN KEY REFERENCES Foo(Id), Data NVARCHAR(10) NOT NULL ); The following …