Current location: Hot Scripts Forums » Programming Languages » PHP » how can i print the primary keys of table in ms access in php code


how can i print the primary keys of table in ms access in php code

Reply
  #1 (permalink)  
Old 12-18-08, 02:06 PM
hawkeye000 hawkeye000 is offline
New Member
 
Join Date: Dec 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
how can i print the primary keys of table in ms access in php code

how can i print the primary keys of table in ms access in php code
i try odbc_primarykeys but it no suitable
pleaaaaase if anyone has the idea
thnx
Reply With Quote
  #2 (permalink)  
Old 12-20-08, 05:53 AM
maneetpuri maneetpuri is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Re:- primary keys of table in ms access

Hi,

I don’t think there is any direct way of doing this. But a way out is, fetch the complete structure of the table and parse it field by filed, for which all fields you get the Primary Key constrain, display it.

Cheers,

~Maneet Puri
__________________
Maneet Puri
India Web Site Design Services
PHP Web Development
Reply With Quote
  #3 (permalink)  
Old 12-20-08, 01:35 PM
hawkeye000 hawkeye000 is offline
New Member
 
Join Date: Dec 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
is there a function used to display the complete structure from ms access???
Reply With Quote
  #4 (permalink)  
Old 12-20-08, 06:20 PM
-[OnTarget]- -[OnTarget]- is offline
Newbie Coder
 
Join Date: Mar 2005
Location: Orlando, Florida
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Some good comments (basically the first one) on the PHP website: http://us.php.net/manual/en/function.odbc-columns.php
__________________
BlueScripts - Free PHP Scripts
Reply With Quote
  #5 (permalink)  
Old 12-21-08, 08:13 AM
hawkeye000 hawkeye000 is offline
New Member
 
Join Date: Dec 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
yes dear i saw it before but also i cant dispaly all structure basically brimarykey field
any help please
Reply With Quote
  #6 (permalink)  
Old 12-23-08, 05:07 AM
hawkeye000 hawkeye000 is offline
New Member
 
Join Date: Dec 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
any help please ?
Reply With Quote
  #7 (permalink)  
Old 12-23-08, 05:24 AM
infinitylimit's Avatar
infinitylimit infinitylimit is offline
Code Guru
 
Join Date: Jun 2004
Location: Oregon
Posts: 758
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know if this will help in this case but what I do is drop back to SQL. I believe DESCRIBE tablename; will at least give you a bunch of information regarding the structure for most SQL based DBs
__________________
Hawk Enterprises -- Home to PHP games, open-source code, tutorials and free downloads
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ms access connection code for Dreamweaver azar_engg ASP 0 08-25-08 09:32 AM
Inserting data to mysql table using php Tjobbe PHP 4 09-28-06 06:37 AM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM
New to perl, could use some help Arowana Perl 4 10-24-03 10:49 AM
Perl code : print "." x 20; - How to do it with PHP ? kevin PHP 2 07-04-03 04:29 AM


All times are GMT -5. The time now is 08:25 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.