w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Display a limit of 15 elements taken from MySQL (while I am forced to use a LIMIT above 15)

You're storing your data wrong.

The cardinal rule of database design (more formally known as first normal form or 1NF) is that every column should hold 1 AND ONLY 1 piece of data (more formally, all data must be atomic).

CSV data is, by its nature, not atomic. It's a number of values stored in a list delimited by commas. If you have such data you'll have difficulty manipulating and querying it, as you've just discovered.

You should normalize you data by putting the data in the settings column in a dependant table and associating it with a row in the primary table with a foreign key.

If this is not an option, you should at least have a column for each setting value.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.