mssql function call from php script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kingdbag
Forum Newbie
Posts: 22
Joined: Wed Jul 12, 2006 6:22 pm

mssql function call from php script

Post by kingdbag »

Hey folks,

Is there a mssql function call to return what fields are in the database you're connected to? I can't seem to find it on google..(if there is one..but im sure there is)

I don't want the data just field names.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

google says:

Code: Select all

select * from syscolumns where id = object_id('table_name_here')
kingdbag
Forum Newbie
Posts: 22
Joined: Wed Jul 12, 2006 6:22 pm

Post by kingdbag »

.....google says..... you are making me look bad!!!!

thanks I will try this out
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

kingdbag wrote:.....google says..... you are making me look bad!!!!
Sorry, I didn't mean to :(
I am just pointing it out as a disclaimer, because I haven't written a single line of MSSql ;) This is something I've seen from SQL injection papers, not something I've actually used.
Post Reply