Make a select question to DB

Make a select question to DB

samsamtestsamsamtest Posts: 52Questions: 15Answers: 1

Hi I need to filter out what I want tol get back from the DB. where and how can I make question like this in datable?

if ($connection->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

$sql = "SELECT * fcount(*} from kund'";
$result = $connection->query($sql);

This question has an accepted answers - jump to answer

Answers

  • MSLtdMSLtd Posts: 56Questions: 5Answers: 4

    Hello @samsamtest , If it's specifically count(*) you're looking for, I'm pretty sure it isn't doable via DataTables functions - you'd have to do this through your own PHP scripts and then pass it into the DataTables system.

  • allanallan Posts: 61,692Questions: 1Answers: 10,102 Site admin
    Answer ✓

    DataTables is a Javascript library - I guess the equivilent is rows().data() which will give the data from the rows in the table. But I'm not certain that is what you are actually looking for.

    Allan

This discussion has been closed.