Tag: sql

56 votes
4 answers
1.1K views
Convert Linq Query Result to Dictionary

I want to add some rows to a database using Linq to SQL, but I want to make a "custom check" before adding the

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
52 votes
14 answers
874 views
How to do SQL Like % in Linq?

I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as Organization FROM Organi

avatar
Venice
0 1 0 9
asked 07 September, 2021
56 votes
4 answers
2.2K views
LINQ Orderby Descending Query

I'm sure this will be a relatively simple one. I have a LINQ query that I want to order by the most rece

avatar
Sena
0 1 0 9
asked 07 September, 2021
51 votes
16 answers
2.2K views
LINQ: When to use SingleOrDefault vs. FirstOrDefault() with filtering criteria

Consider the IEnumerable extension methods SingleOrDefault() and FirstOrDefault() MSDN documents that SingleO

avatar
Corrin
0 1 0 9
asked 07 September, 2021
62 votes
14 answers
1.3K views
Returning IEnumerable<T> vs. IQueryable<T>

What is the difference between returning IQueryable<T> vs. IEnumerable<T>, when should one be pref

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
53 votes
19 answers
2.2K views
Difference Between Select and SelectMany

I've been searching the difference between Select and SelectMany but I haven't been able to find a s

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
51 votes
7 answers
908 views
Multiple "order by" in LINQ

I have two tables, movies and categories, and I want to get an ordered list by categoryID first and then by Na

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
55 votes
17 answers
1.9K views
Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework

I want to save my Edit to Database and I am using Entity FrameWork Code-First in ASP.NET MVC 3 / C# but I am g

avatar
Scot
0 1 0 9
asked 07 September, 2021
55 votes
7 answers
2.1K views
Securing php api to use in android application

I am newbie to android development. I am using android studio for developing an application. Things i have don

avatar
Eddie
0 1 0 9
asked 07 September, 2021
59 votes
6 answers
1.3K views
Postgres error: null value in column "id" - during insert operation

I use postgresql and yii2 framework. Well I got a very interesting error message: SQLSTATE[23502]: Not null v

avatar
Charis
0 1 0 9
asked 07 September, 2021
54 votes
4 answers
1.4K views
"Invalid parameter number: parameter was not defined" Inserting data

I've been using Yii's active record pattern for a while. Now, my project needs to access a differen

avatar
Denese
0 1 0 9
asked 07 September, 2021
55 votes
8 answers
1.5K views
Yii2 How to perform where AND or OR condition grouping?

I am new to Yii-2 framework. How can i achieve following query in Yii-2 framework using activeQuery and models

avatar
Venice
0 1 0 9
asked 07 September, 2021
59 votes
2 answers
3K views
Matching all values in IN clause

Is there a way to ensure all values in an IN clause are matched? Example: I can use IN as: IN (5,6,7,8). I

avatar
Solomon
0 1 0 9
asked 07 September, 2021
54 votes
6 answers
1.8K views
Linq to Sql: Multiple left outer joins

I'm having some trouble figuring out how to use more than one left outer join using LINQ to SQL. I under

avatar
Frederick
0 1 0 9
asked 07 September, 2021
54 votes
4 answers
2.7K views
WooCommerce: Finding the products in database

I'm creating a website using WooCommerce and I want to restrict the available products to users depending

avatar
Scot
0 1 0 9
asked 07 September, 2021
57 votes
5 answers
467 views
Column count doesn&apos;t match value count at row 1

So I read the other posts but this question is unique. So this SQL dump file has this as the last entry. INSE

avatar
Keith
0 1 0 9
asked 07 September, 2021
56 votes
17 answers
1.2K views
Access denied for user &apos;root@localhost&apos; (using password:NO)

I'm new to MySQL, I'm trying to run WordPress in my Windows desktop and it needs MySQL. I install e

avatar
Alba
0 1 0 9
asked 07 September, 2021
61 votes
14 answers
2.8K views
#1273 - Unknown collation: &apos;utf8mb4_unicode_ci&apos; cPanel

I have a WordPress database on my local machine that I want to transfer to a hosted phpMyAdmin on cPanel. Howe

avatar
Nidia
0 1 0 9
asked 07 September, 2021
52 votes
8 answers
3.1K views
Table is marked as crashed and should be repaired

I am getting this error in wordpress phpMyadmin #145 - Table './DB_NAME/wp_posts' is marked as cras

avatar
Brianne
0 1 0 9
asked 07 September, 2021
49 votes
15 answers
2.2K views
#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’

I have a WordPress website on my local WAMP server. But when I upload its database to live server, I get error

avatar
Sachiko
0 1 0 9
asked 07 September, 2021