newbie question with MS SQL
newbie question with MS SQL
I am using MS SQL for the first time and struggle to make it work.
I was able to connect to SQL, but I don't know enough to solve error on ssp.class.php,
line #408 $stmt = $db->prepare( $sql ); //Fatal error: Call to a member function prepare() on a non-object
DataTable live link is below.
http://live.datatables.net/gocorusi/1/edit?html,css,js,console,output
When I was using MySQL, I never had to edit ssp.class.php file.
MS SQL 10.50.2550 on @008 R2 server, PHP 5.4, .dll files installed.
I am a newbie, so take it easy on me, first time posting, and not sure if I enter DataTables live correctly.
Thank you,
-- Toshi
Answers
The demo SSP class is not designed to be used with SQL server. Indeed it uses some SQL with is specific to MySQL only. You would need to rewrite the demo code to use MSSQL.
Regarding the specific error you are seeing - that suggests that
$db
is probablyfalse
, which means your initial database connection failed for some reason.Allan
Allan,
Thank you for reply.
$db actually picks up
that's why I thought there might be workable solution for my case. Thanks again,
-- Toshi
I would have expected
$db
to be a resource. It looks like it is an array, which is why PHP it giving an error about there being noprepare
method.Allan
Maybe see this if MS SQL is the database:
https://www.datatables.net/forums/discussion/comment/86780/#Comment_86780
Dan,
Thank you very much for sharing your experience, I semi-gave up, and wrote simple query to display table with adding CSS to make it presentable, however there are ton's of challenge ahead of me, sorting table, searchable...etc I had never had this with MySQL.