php - MS SQL, invalid object name -


okay, let me make short, can delete whole row database using code:

$sql = "delete [master].[dbo].[testtbl] agent_id = '{$_session["agentid"]}' "; 

but when try:

$sql = "delete username [master].[dbo].[testtbl] agent_id = '{$_session["agentid"]}' "; 

i tried make [name], still invalid object name username...

i want delete username of agent_id appreciated. :d

delete username [tablename]        ^ 

you cant delete 1 column using delete command. have delete whole row

delete [tablename] 

want delete username of agent_id

you can use update command change information

update [tablename] set username=null agent_id=1  // or whatever value 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -