[thelist] Hi {newbie here]

Ian Anderson ian at zstudio.co.uk
Thu Mar 23 04:27:12 CST 2006


Mark Mckee wrote:

> I have a database which has 40 tables, 3 fields per table. (id, 
> header, body).

First, why do you have 40 tables each with the same data structure? If 
the tables really are that similar, you need just one table of pages and 
one table of pageTypes, related by having a foreign key column 
pageTypeID in the pages table.

> I am really struggling trying to create an edit/update and delete 
> posts page. I have looked into switch statements, if statements and 
> others.

Is it the model you're having trouble with, or the detailed coding in 
each page? As Max suggested, you need to be more specific about your 
question.

Both the edit and delete page are usually created using self-submitting 
forms. The page first creates a recordset using a supplied pageID for 
the page to be edited or deleted, and displays information to the user. 
When the form is submitted, the page builds and executes a SQL query 
which updates or deletes the relevant record in the database. The page 
then redirects back to a listing page or displays a confirmatory message 
to the user.

Perhaps post the code somewhere for us to see if it's a coding issue. 
Try posting code here [1], then include the URL with a more detailed 
question to the list.

If it's about the detailed coding, I'd suggest asking one specific 
question at a time, but always Google for the answer first.

Observation: It's interesting how often starting an email to the list 
helps to define the question sufficiently to Google it properly.

Hope this helps

Cheers

Ian

[1] http://thelist.pastebin.com/


-- 
_________________________________________________
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net - Online code library
File, manage and re-use your code snippets & links
http://snippetz.net




More information about the thelist mailing list