
![]() |
perkiset
NBs helped me out a great deal today and got me going forward with a MSSQL task. Thanks man, very much.
Karma required I throw something back, so here is how to see all the tables in a database in MSSQL. I put it here because I had to google for it and better here than there. This is stoopid simple but nice to have: mssql_connect('theserver', 'username', 'password'); mssql_select_db('thedb'); mssql_query("select name from sysobjects where type='u'"); while ($row = mssql_fetch_row()) print "{$row[0]} "; Another interesting tidbit: when doing my first SELECT today, I got a permission denied on the table I was selecting from. Even though my default database was correct, I still had to mssql_select_db as shown above to get things to work pro perly.vsloathe
Thanks Perk.
I think in oracle you query system.tab SELECT * FROM system.tab In case anyone ever needs to know how much I remember from college... |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads