Question:
how to fix this error “ PHP Fatal error: Call to undefined function mssql_query() ”?
anonymous
1970-01-01 00:00:00 UTC
how to fix this error “ PHP Fatal error: Call to undefined function mssql_query() ”?
Eight answers:
pradeep
2013-06-19 01:50:43 UTC
never used mssql. try mysql it may work.
mangeram
2016-12-31 15:52:18 UTC
Mssql_query
anonymous
2016-09-17 15:33:41 UTC
Hello! Someone in my Twitter feed shared this question so I came to look it over. I'm definitely loving the information. I'm book-marking and will be tweeting it to my followers!
Pebrook
2015-08-19 05:35:44 UTC
This Site Might Help You.



RE:

how to fix this error “ PHP Fatal error: Call to undefined function mssql_query() ”?

I am using code igniter and trying to configure it with MS SQL but I am getting this error:



PHP Fatal error: Call to undefined function mssql_query()



I am using



CodeIgniter – 2.1.3

XAMPP – PHP (5.4.7), Apache (2.4)

MSSQL - MS SQL Express edition 2008 R2

SQL Drivers :...
Kaydell
2013-06-22 13:27:28 UTC
I think that it's a good idea to insulate the majority of your code from accessing a particular database API such as mysql or mysqli or mssql and to instead encapsulate database functionality into classes such as: DB, DBTable, etc.



Maybe it's late in the game for that, but it's a good idea to use object-oriented programming to insulate your code from a particular database engine or API.



If you need to use SQL in the rest of your code and not encapsulate all of the database functionality into a handful of classes, you can use standard SQL that will work for different database engines.



Another thing to consider is downgrading your PHP back to a version that does support mssql.



Recently, I downgraded from the latest version of Python3.3.1 down to Python2.x.x I would have thought that the latest version was best, but it wasn't.



I've decided not to use Python on the web. It's just not standard like PHP is.



Similarly, you may decide that mssql is just not as standard like mysql/php is. MySQL and PHP seem to be well-supported everywhere you go.
?
2013-06-19 00:34:49 UTC
You should look into MySQL, much more information on the internet for correcting fatal errors, as I've never used MSSQL before.

You could try "$query = $link->mssql_query('SELECT * FROM [msci].[dbo].[employee]');" As it may require the connection link as an object to query. This is not how MySQL works I may note, but it is a suggestion.
Laurence I
2013-06-19 00:25:12 UTC
go to school

the w3 school



wrong name mysqli
AnalProgrammer
2013-06-19 00:30:37 UTC
Try this link.



Have fun.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...