473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

error msg for mssql_query()

Avatar19
Hi everyone,
I am getting a confusing error message, I have done some googling an can't find a good solution.

My error message is :

Fatal error: Call to undefined function mssql_query() in C:\xampp\htdocs\dbf\database_files\AddUsers1.php on line 24

The code that is generating this error is :

Expand|Select|Wrap|Line Numbers
  1. $q1 = mssql_query("INSERT INTO users (name, surname, dob, status) VALUES ('$name', '$surname', '$birthdate', '$status') SELECT
  2. SCOPE_IDENTITY() AS [SCOPE_IDENTITY]");
  3. $r = mssql_fetch_assoc($q1);
  4.  
  5. $insert_id = $r['SCOPE_IDENTITY'];
  6. echo $insert_id;
  7.  
  8.  
I have tried the insert with just mysql_query() and it works great, so there is no problem with the variables or connection.

Also a second question, could someone please provide a explanation as to how SCOPE_IDENTITY() works because Google has not been very helpful in giving me an explanation I can understand clearly.

Thank you for any and all help,
Avatar19
Apr 10 '11 #1
3 3391
code green
1,726 Expert 1GB
Looks like you don't have mssql enabled in the php.ini file.
The statements will be there, They just need un-editing or setting to true,
Apr 12 '11 #2
Oh ok cool, thanks a lot I will give it a look when I get home and let you know if it works out.
Thanks code green

Avatar19
Apr 12 '11 #3
Hey so perhaps someone can help give me a lil more direction on what I need to do cos I still cannot figure it out.

I am using xampp and my directory looks like this
and I am assuming that the ini file that I need to alter will be in the php folder within xampp.
I think this cos I have looked in most of them and the only ones with ini files are in the php folder.

So in the folder there are 3 files called 'php'.
one is of type 'configuration setting'
one is of type 'INI DEVELOPMENT FILE'
one is of type 'INI PRODUCTION FILE'

I assumed that I should alter the config type file.
I did a word search for mssql and found this:
extension=php_mssql.dll
extension=php_pdo_mssql.dll
as well as a whole subsection titled mssql.
I enabled all of them but the function still doesn't work ??
Apr 13 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
5
by: yashu0209 | last post by:
I have an error occurring when i try to compile the program and the error is: D:\Program Files\visual studio 6.0\MSDev98\MyProjects\GLEnabledView\GLNew.cpp(164) : error C2653: 'CGLEnabledView' :...
2
by: randa zaghdan | last post by:
Hi I have a problem with my program in vc 2008 When I compile it, the following errors are listed. I try to resolve it but no hope Does any one can help me ? thanks . Linking......
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.