Create MySQL database on the fly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • virtualweb
    New Member
    • Aug 2007
    • 30

    Create MySQL database on the fly

    Hi:

    I'm a novice regarding MySQL management with perl.

    I have read several online tutorials and managed so far to create a Table, insert a row, make some edits to specific items already saved in specific rows, display the last row entered, etc, in other words I feel I've done considerable progress.

    Now I'm converting an online auction script to work from flat file database to MySQL. When a user enters a new item in the auction a flat file is created to save all the bids his items get until it's sold.

    So far all I have learned through tutorials is how to manipulate a database already created through the cPanel, but now I need to create a new database on the fly from my perl script for each item entered.

    I have a "Business" share hosting Linux server account at hostgator.com. But their support team cannot give scripting advice.

    Can you give me some tips..??
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Wrong. You don't need or want to create a new database for each new item; that would be crazy.

    You need to add a new record to an already existing table in the database.

    Comment

    • Luuk
      Recognized Expert Top Contributor
      • Mar 2012
      • 1043

      #3
      i agree with RonB

      But also you should store the bids in a record that contains (a reference) to the item being sold.

      How are your table(s) currently defined?

      If your tablename is `mytable`, i'm interested in seeing the output of
      SHOW CREATE TABLE `mytable`

      Comment

      Working...