_Umar's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
43 (0.03 per day)
Joined:
24-December 08
Profile Views:
1,592
Last Active:
User is offline Jun 06 2011 12:55 AM
Currently:
Offline

Previous Fields

Country:
PK
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Mitsubishi
Dream Kudos:
0

Latest Visitors

Icon   _Umar has not set their status

Posts I've Made

  1. In Topic: Create table query won't create table with an integer as its name

    Posted 6 Jun 2011

    View PostAtli, on 19 May 2011 - 06:48 PM, said:

    Hey.

    You could simplify this by doing:
    CREATE TABLE IF NOT EXISTS `theTableName`(...)
    

    Then MySQL will simply ignore the statement if the table already exists.


    That said, when you start creating tables "on-the-fly" using actual data as identifiers, you've usually gone down a weird path. - The data should go into tables, not become actual tables.

    From what you've posted, it almost looks like your creating one table per student?
    If so, then that is not a good way to deal with this. A better way would be to create one table to store all the students in.


    Hey, yes your right I was making a table per student.. which I realized not too long after making that query work that I was doing it wrong.
    So I re-thought everything and made 1 database with many tables inside it, and making this work using relationships among tables.

    Thanks

My Information

Member Title:
New D.I.C Head
Age:
23 years old
Birthday:
September 24, 1989
Gender:
Location:
isb,Pak
Interests:
playin football, n playin fifa on computer
Years Programming:
2
Programming Languages:
HTML, CSS, PHP,jQuery

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://

Friends

_Umar hasn't added any friends yet.

Comments

_Umar has no profile comments yet. Why not say hello?