Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help w/ database issue vs. gridview & add/edit forms

Status
Not open for further replies.

dzr

Programmer
Nov 20, 2001
109
US
program_table -- all program data
topics_table -- program topics - 1 record for each row so 1 program may have 20 rows in this table with the foreign key = program_table.id

so grid view only supports 1 table so add/edit forms have to be hand made

do i put it all in a table and have the topics as a comma delimited list? bad design but more compatible w/ the visual web developer. but that's not working anyway...

and if i keep the proper structure - how do i get all the data together to have users search topics to find programs...?

i guess i'm not as good at SQL as i thought since i don't seem to be able to put together a query that joins all the program data for a good solid search.


i cannot figure out using the @variable in a like statment... will need this regardless for the keyword search.

i have to make an admin for this and am taking way way too long to get these forms done :-/

please - recommendations... advice... input ??

 
dzr: Until one of the SQL experts drop in you might try doing a serach here at Tek-Tips -- there are many threads which discuss several of the issues you present. Of course you can follow this up doing a Google Groups search (and web) -- from reading your post a couple of notes.

In one to many tables what I like to do (may or may not be applicable to your case) is to make a master grid, which, when clicked (hyperlink) it opens a second grid underneath it with the child results, etc. Some folks here (and there are many threads on this as well) actually embed the second grid within the first. I would assume editing in either would be ok so long as ref integrity is maintained).

Sounds like you have several things going on. Its easy enough to concatenate results and string them together but be careful to avoid an ill-designed table -- better to manipulate the data in JOINS etc then to create something on the bottom end you may regret down the road.

What I would do is make a decision as to how you want your table structure and your Web edit forms. Do you want want to edit within the Grid? Can you accomodate two Grids or nested Grids? Break this down into a bulleted list of objectives. Others may drop by in a bit and give you there assessment. Just a few thoughts to help you along.
 
thanks so much for your input.

trust me i have searched much - this forum, other forums, googled tons... there really is so much to comprehend... and so different from how i'm used to w/ php & cold fusion.

biggest problem is that i have no foundation of understanding so 1/2 of what you say hurts my head. the ideal would be to learn the language before being handed a project... but here i am...

will someone please ask me a php question so i can feel smart again?!

again, thanks.
 
dzr: I can relate, I've seen php code and it looks like Thai to me. If I ever run into php (may do so with an upcoming Discusson Forum - but I heard Tek-Tips was putting one out so waiting on word from them).

It's not so hard. Start with a plan; tables first. I would keep your one to many intact, and go with either 2 Grids (2d one opening up after selecting from a hyperlink) or you could go with nested Grids (the later might be a bit cleaner but both are doable). Or, alternatively, you could have a Web Form (another page) open up on clicking the Grid for editing child data.

Start from the beginning, we'll help you through it; that is why we are here. Start with your tables, and then come up with a plan for editing. The syntax for string searches using the "@" symbol, ect, is the easy part, believe me.

As they say, getting started is 50% of the job!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top