Fatal Error Call To Undefined Function Mssql_query
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Fatal error: Call to undefined function mssql_query() up vote 2 down vote favorite 3 So I keep getting this error when I want to query something to the ms sql server.. The connection is made with the database but the queries seem to fail. The error log contains this: PHP Fatal error: Call to undefined function mssql_query() The code on the php: session_start(); include_once("connect.php"); if (isset($_POST['username'])) { $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * FROM test WHERE username='".$username."' AND password='".$password."'"; $res = mssql_query ($sql) or die(mssql_error()); if (mssql_num_rows($res) == 1) { $row = mssql_fetch_assoc($res); $_SESSION['uid'] = $row['id']; $_SESSION['username'] = $row['Username']; $_SESSION['afdeling'] = $row['Afdeling']; $_SESSION['mail'] = $row['Mail']; header("Location: test.php"); exit(); } else { echo "Invalid login information. Please return to the previous page."; exit(); } } ?> Does anybody knows what the problem is? Thanks in advance! connect.php code: "PROCES_TEST", "UID"=>"blaaa", "PWD"=>"blooo"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.
"; }else{ echo "Connection could not be establishe
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Php - http://stackoverflow.com/questions/17103751/php-fatal-error-call-to-undefined-function-mssql-query Call to undefined function mssql_query() up vote 0 down vote favorite I have used the following php code to show the number of rows from sql table but I am getting below error message. Fatal error: Call to undefined function mssql_query() in D:\wamp\www\thereport24\gp.php on line 22 my code: $conn = odbc_connect('gpcon','',''); if ($conn) { $query= "select * from SubscriberServices where SubscriptionGroupID like 'ms_gp_tr24bn_3333'"; $results = http://stackoverflow.com/questions/26817014/php-call-to-undefined-function-mssql-query mssql_query($query); $rows = mssql_fetch_array($results); echo $rows[0]; mssql_close($con); } php sql-server share|improve this question edited Nov 8 '14 at 18:36 user3666197 7,82421330 asked Nov 8 '14 at 12:14 Sazal Ahmed 496 3 check if extension=php_mssql.dll is uncommented in your php.ini and mssql installed on your machine –bigbobr Nov 8 '14 at 12:18 @bigbobr , check if extension=php_mssql.dll ...it is done ...mssql already installed...but i m getting same error... –Sazal Ahmed Nov 8 '14 at 14:06 possible duplicate of Can't connect to sql from php script –Max Nov 8 '14 at 17:19 @Max...i have follow it ...but facing same problem...what is it real solution.. –Sazal Ahmed Nov 8 '14 at 18:41 Have you restarted Apache/PHP? Can you call php_info() and see if the right extensions are indeed loaded? –GolezTrol Nov 8 '14 at 21:00 | show 1 more comment 1 Answer 1 active oldest votes up vote 0 down vote If you use sql server, use this code. This works for me: "sa", "PWD" => "Password", "Database" => "DBname"); $conn = sqlsrv_connect($serverName, $options); if( $c
MSSQL Javascript Disabled Detected You currently have javascript disabled. Several functions may not work. Please https://forums.phpfreaks.com/topic/275114-fatal-error-call-to-undefined-function-mssql-query/ re-enable javascript to access full functionality. Fatal error: Call to undefined function mssql_query() Started by maideen, Mar 02 2013 10:51 AM mssql php Please log in to http://board.phpbuilder.com/showthread.php?10379035-PHP-Fatal-error-Call-to-undefined-function-mssql_query() reply 4 replies to this topic #1 maideen maideen Advanced Member Members 31 posts Posted 02 March 2013 - 10:51 AM Hi, I am new in PHP. I fatal error have tried to connect MSSQL 2005 through php. I am using xampp 1.8.0 But once run, error msg is "Fatal error: Call to undefined function mssql_query()". I have copied "php_mssql.dll" in PHP folder and enable in PHP.ini as "extension=php_mssql.dll" and also tried copied in PHP/ext folder also (all above got from forum PHP FreaksPrevious topics) fatal error call But nothinghappened. Same error appear. Can anybody help? Pls Help me. Below is code. I am running xampp in my local mechine with Win 7 pro It is config.php open($connStr); ?> " . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned "; while($row = mssql_fetch_array($result)) { echo "
this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 4 of 4 Thread: PHP Fatal error: Call to undefined function mssql_query() Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 04-13-2011,07:42 AM #1 zyntrax View Profile View Forum Posts Junior Member Join Date Apr 2011 Posts 4 PHP Fatal error: Call to undefined function mssql_query() Hi i am trying to populate a combobox with info from a table but i get the error: PHP Fatal error: Call to undefined function mssql_query() in C:\Users\exalell\Desktop\WWW\test\index.php on line 34 This is my index.php: Code: 0) { // For each result returned, display it while ($row = mssql_fetch_array($result)) echo $row[serial]; } // Otherwise, no results, tell user else { echo "No results found."; } } // Error connecting? Tell user else { echo "Failed to connect to database."; } } // The form has NOT been submitted, so show the form instead of results else { // Create the form, post to the same file echo "