Skip to content

Tag: datatables

Datatables don’t load content of database

I’m trying to load users from a table in my database using datatables( but the page is not loading anything at all. I’m getting these errors when I open the console [1]: I loaded the js and css here in this order: [uncaught ReferenceError: jQuery is not defined at dataTables.bootstrap.min.js:5 at dataTables.bootstrap.min.js:5][1] /> Answer if the page is not

SQL new table with conditions

I have a table and I want through sql to parse it into another table. The problem is that there is a condition: There are 3 columns in old version And I want to store them into new table’s column like : Thanks in advance. Answer You can use case expressions and string concatenation, like so: This uses standard string

Auto-increment a primary key in MySql

During the creation of tables using mysql on phpmyadmin, I always find an issue when it comes to primary keys and their auto-increments. When I insert lines into my table. The auto_increment works perfectly adding a value of 1 to each primary key on each new line. But when I delete a line for example a line where the primary

Query based on some data multiple compare

Table: How do i bring the period when customers have max cc_limit? If the cc_limits same for customer for more than one month, take the period with highest year-month data Answer Use row_number() window function,Below should work. EDIT : To clarify why order by should be in the inline view. Scenario : When there are duplicate records for same cc_limit