Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 06:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[MSSQL] WHERE AND oder ,?

Discussion on [MSSQL] WHERE AND oder ,? within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 12
Join Date: Jun 2007
Posts: 1,052
Received Thanks: 403
[MSSQL] WHERE AND oder ,?

Hello.


I have a problem in MSSQL.

Code:
<?php


		$msconnect = mssql_connect("localhost");
		$msdb = mssql_select_db("kal_db", $msconnect);
		$query = "UPDATE Skill SET Level = '55' WHERE Index = '32', PID = '610'";
	
		mssql_query($query);
?>
I defined 2 WHERE clause by putting a ", " betwen both values. but yea it allways gives me an error

Code:
Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'Index'. (severity 15) in
if i seperate them with AND i get the same error -.-

Please help ;D.
_FightZ_ is offline  
Old 06/28/2010, 17:37   #2
 
elite*gold: 20
Join Date: Sep 2006
Posts: 1,100
Received Thanks: 184
Code:
$query="UPDATE Skill SET Level = 55 WHERE Index = 32 && PID = 610";
müsste gehen und für Integer Konstanten kann man die ' auch weglassen soweit ich weiß.
Bot_interesierter is offline  
Old 06/28/2010, 23:09   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 319
Received Thanks: 88
ya know, "Index" is a Statement in MySQL ;D
Read the manual and lern to escape your SQL Strings!
Quote:
$query = "UPDATE `Skill` SET `Level` = '55' WHERE `Index` = '32', `PID` = '610'";
Fratyr is offline  
Reply


Similar Threads Similar Threads
MSSQL
08/17/2010 - Flyff Private Server - 0 Replies
Haiii, ich habe folgendes problem.... Als ich MSSQL auf meinem Laptop gemacht hab hab ich kein PW und Benutzernamen gemacht. Ich wollte mal fragen ob man sich noch i-wie anmelden kann damit man ein Account hat also bei SQL Server-Authentifizierung. MFG
[HELP]MSSQL
04/30/2010 - Dekaron Private Server - 5 Replies
Hey guys almost every tutorial says I need Microsoft SQL Server 2000 with SP4. Well, sorry to tell you but to upgrade you need a 6.5 SQL Server which Microsoft stopped sharing mid 2008. So do I REALLY need SQL Server 2000 or can I use whatever version I want?
MSSQL
02/06/2010 - Dekaron Private Server - 2 Replies
Ok. I've got one more problem. MSSQL wont run. it gives error 193. Anyone have any ideas on this?
[HELP] MSSQL in C++
11/10/2009 - CO2 Programming - 2 Replies
So I've recently started to work with C++ and I'm facing rather annoying problem, databases. I'm using MSSQL and it seems like there is no proper tutorial on how to use it on the internet. Has anyone used MSSQL and C++ together and if you did, did you use third party library or did you build your database wrapper from scratch? I'm not really into using MySql (irony is that you can find a lot of tutorials on this) so I'm using MSSQL. Any help setting this up would be greatly appreciated.
MSSQL ?
08/27/2009 - Dekaron Private Server - 0 Replies
Hi i get the Database Back up but how i can batch them in Navicat ? or i need a spezial programm ?



All times are GMT +1. The time now is 06:48.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.