Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-12-2005, 01:14 PM   #16 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
what is the end user level use of the name "cnfg1" ? is it referencing an actual file somehwere? is this a fixed table? or are rows always added. will there ever be gaps in the numbers? i guess i don't understand the practical use of this table.

to me it still seems you should not be using a number in the name if that is sort of a key identifyer you are using to sort configs.

if there can be a cnfg1 and a nwcnfg1, then it seems to make sense to have a 'id' and 'cfgtype' field.

id ( numeric, but not unique since there can be cnfg1 and nwfng1, this is the '1' value )
type - ( cnfg or nwcnfg, or ...?)
definition-stores
file-stores

with this setup the query would simply be

"select * from table where id=1 and type='cnfg'"

or for ordering configs

"select * from table where type='cnfg' order by id"

again though, there is so much speculation in this advice since i don't know the entire scope of what you're trying to accomplish.
__________________
Mike
sde is offline   Reply With Quote
Old 10-13-2005, 01:13 PM   #17 (permalink)
Odoggy5
Code Monkey
 
Odoggy5's Avatar
 
Join Date: Aug 2003
Location: SF
Posts: 47
Odoggy5 is on a distinguished road
Send a message via AIM to Odoggy5
its really basic...

all it is definitions for fields in a table or for configs in a mem file which my company uses for its software. i am just creating a way people can look by particular file all of the configs in that file, or be able to search a specific field or config(they show up in error messages). the information changes between revisions so we need to be able change them, hence the reason i am not just making static pages.

the lpad thingy is working for me right now so i guess i am going to stick with it for now.

in future tables it would probably be a good idea for me to seperate the fields when i do something like this. but im too far into it now and have most of the data uploaded in to my tables.
Odoggy5 is offline   Reply With Quote
Reply

Bookmarks

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
DB Design Question Part II sde Program Design and Methods 10 09-02-2008 12:37 PM
hey redhead quick question about c/c++ rogue Standard C, C++ 2 05-23-2005 02:22 AM
Question about getting Arrays metazai PHP 16 04-24-2004 07:27 PM
another question Ilya020 HTML, XML, Javascript, AJAX 5 08-20-2003 12:54 PM


All times are GMT -8. The time now is 03:32 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting