Hi,

in some sense I just conclude the previous answers: The perlish part
1. Don't use user inputs directly to modify a database Use tainted variables, arrange the input intelligently.
The Database part:
2. It seems, that you use one large table for your project. However, you should really do some normalization. For example, create tables for the Artists, CDs, Titles separately. At least you should try to separate the static part of your database from the changing part, or slowly changing parts from fast changing parts. For example, create a table for the users (it is relatively static) and a table for the comments or deleted titles (relatively dynamic).
3. DELETE is on every serious RDBMS an operation that requires a COMMIT (sometimes this is done automatically) because it is an operation that can leave the database in an inconsistent state. May be, it is required here.
4. If DELETE is done frequently, use prepared statements.
These are some ideas for the moment. I hope these are useful for the further design.


In reply to Re: Issuing a DELETE statement with DBI by dokkeldepper
in thread Issuing a DELETE statement with DBI by mattdope

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.