»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 07-19-2003, 03:07 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Berlin, Germany
Posts: 3
sandoba is on a distinguished road
Get MSSQL field flags with PHP

Hello,

I'm currently developing a new database abstraction script. But there are some problems with MSSQL and field flags. How is it possible to get all the information about a field flag (like in MYSQL, e.g. "not_null primary_key auto_increment...")?

And my second question: Is it possible to list all the user defined databases?

Thank you for your answers!

sandoba is offline   Reply With Quote
Old 07-19-2003, 03:32 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
You maybe able to do a query in query analyzer

select * from sysobjects where xtype = 'U'
make sure to do the query on the master database.

not sure how to get the flags off hand though.
You could simply set them so you KNOW what it is?

Welcome to TechIMO
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 07-19-2003, 03:39 PM   #3 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Berlin, Germany
Posts: 3
sandoba is on a distinguished road
Of course I could, but my cms has a database tool like phpmyadmin but not only for mysql. Users should also be able to set flags and thats why I need to get and show them at first (without access to the master db because of shared hosting).
sandoba is offline   Reply With Quote
Old 07-20-2003, 04:16 PM   #4 (permalink)
Registered User
 
Praetorian's Avatar
 
Join Date: Oct 2001
Location: Yuma, AZ
Posts: 2,484
Praetorian is on a distinguished road
Send a message via ICQ to Praetorian Send a message via AIM to Praetorian Send a message via Yahoo to Praetorian
Hmm....is MSSQL somewhat like MySQL? In MySQL you just do explain table or describe table.
Praetorian is offline   Reply With Quote
Old 07-20-2003, 04:30 PM   #5 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Berlin, Germany
Posts: 3
sandoba is on a distinguished road
I tried with mssql enterprise manager, but it wasn't possible. If you know any websites/forums for db professionals, please tell me where to find these. Thanks.
sandoba is offline   Reply With Quote
Old 07-20-2003, 08:26 PM   #6 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
qball is on a distinguished road
Quote:
How is it possible to get all the information about a field flag (like in MYSQL, e.g. "not_null primary_key auto_increment...")
flag? more like column property/attribute. This info is found in the DB schema.

Quote:
I tried with mssql enterprise manager, but it wasn't possible.
Then you aren't using that tool properly, as any DB enterprise manger will provide that info, ways to manage,etc, else NOT 'enterprise manager'.

can you use, 'mssql enterprise manager' to execute SQL statement?
qball is offline   Reply With Quote
Old 07-23-2003, 12:03 AM   #7 (permalink)
Registered User
 
Join Date: Sep 2002
Posts: 265
Creosote is on a distinguished road
Look up "sp_describe_cursor_columns" in SQL Server Books Online. That stored procedure should give you the information you need.
Creosote is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 04:56 AM.