SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast rhinovalley's Avatar
    Join Date
    Jul 2005
    Location
    Minneapolis, Minnesota
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Basic database question

    Hi. I was wondering how to actually set up a database on your site. I have a server that has PHP and MySQL abilities, and I know enough PHP and MySQL to get one started (organizing clients is what I want to eventually do), but what do I actually do to create the database. I mainly use Access to create databases off my system. Do I just upload the database file online and use queries to pull information from it? I'm just new to the whole database thing. Some advice/help would be very appreciated.

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No, you'll have to issue sql commands manually to create the tables, unless you also have phpMyAdmin on the server (most hosts install this, as it reduces the calls to their support desk).

    Normally a host that gives you mysql has set up the database for you, then you just create your tables, and then add your data. You create web forms and some php scripts to write the comtents of the forms to the tables, and other forms and php scripts to query the tables.

  3. #3
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're on a shared host most likely the host has already created the database.
    Note: a database is NOT a table.
    2 very different things.

    And if you're trying to convert an Access database to MySQL.... good luck because I have no idea how (or if it's even possible).
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  4. #4
    SitePoint Enthusiast rhinovalley's Avatar
    Join Date
    Jul 2005
    Location
    Minneapolis, Minnesota
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx for the help guys....it turns out I have a myphpadmin account set up so I'm starting to create the database. I appreciate it!

  5. #5
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you only have one table in your current access db you may be able to export your data in a csv file and import the data into your new mysql database using sql execute in phpmyadmin.
    Build Your Own Web Database - WebSiteDatabases
    vBulletin Forum Administration - vBwebmaster

  6. #6
    SitePoint Enthusiast rhinovalley's Avatar
    Join Date
    Jul 2005
    Location
    Minneapolis, Minnesota
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx for the help all. one more question, what is a good way of making sure the data in my db is secure and only accessable from the php scripts i write to pull out the info?

  7. #7
    SitePoint Enthusiast shref's Avatar
    Join Date
    Nov 2004
    Location
    Egypt, Alexandria
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's secure by default as no one can see your php code so he can't know your database username or password
    but take care about the data you are getting from the users to avoid the injections
    and if you are using php it will be good to use mysql_real_escape_string()

    and by the time you will learn more about that
    Shreef
    blog: shreef.com
    twitter: @shreef

  8. #8
    SitePoint Enthusiast rhinovalley's Avatar
    Join Date
    Jul 2005
    Location
    Minneapolis, Minnesota
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx for the help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •