Datatables problems, Any tips/tricks would be awesome

Datatables problems, Any tips/tricks would be awesome

rixajarixaja Posts: 1Questions: 0Answers: 0
edited January 2013 in General
http://live.datatables.net/oceluz/edit#javascript,html,live

is my JsFiddle

and : http://debug.datatables.net/oluyun

is the debug

and this is where I create my json data :

[code] <?php
//We connect to the database
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="testdbpass"; // Mysql password
$db_name="test"; // Database name

// Connect to server via PHP Data Object
$dbh = new PDO("mysql:host=localhost;dbname=test", $username, $password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

try
{
$query = $dbh->prepare("SELECT * FROM inoffice WHERE counselorname IS NULL");
$query->execute();
$result = $query->fetchall();
}
catch (PDOException $e) {
error_log($e->getMessage());
die($e->getMessage());
}



echo json_encode($result);

?>

[/code]

I am having such a hard time getting ajax to work. I have been googling for days and still nothing. I have used the jquery ajax function, I have tried the datatables function and nothing. my json data is being echo'd, but one thing I need it to have is for it to be in PDO and no in MYSQL, so the PHP page that Allen has made is out of the question as he is using depreciated mysql_

Please any help would be great.





This table needs to get populated when ever there is an insert to the mysql table and the table needs to get unpopulated when there is another insert that changes the view of the table.
This discussion has been closed.