Jump to content

Dawie

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Cape Town, South Africa

Dawie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks very much!!. Problem solved!.
  2. Hi, I have a simple table: id surname 1 gastrow 2 gilmer 3 green 4 greenwood 5 gunther (sorted in surname) When the user types in \"gr\" and clicks \"go\" the select statement should return \"green\" and \"greenwood\" I\'m using: \"SELECT * FROM table WHERE surname >= \'$surname\'\" but this also returns \"gunther\" which is incorrect. Anybody with advice please? Thanks
  3. Thanks, I was a bit confused with the syntax.. but then, I\'m also a newbie =
  4. Hi I\'m storing a MySql table name in a PHP variable e.g. $tbl = \"example\".$coy; Why does: $sql_command = (\"SELECT * FROM \'<?php echo $tbl; ?>\' WHERE id = \'$id\'\"); not work? Is there a way to do it? I unfortunately HAVE to store the table name in a variable cuz it is different for different companies. Thanks
  5. Hopefully my last database/table design question. Which of the following two designs is best in terms of speed of access: table 1: 1000 rows and 50 fields (cols) Or table 2: 50 000 rows (1000 * 50) and 4 cols Thanks once again
  6. Thanks so much for the good advice.. I really appreciate it
  7. My problem is my MySQL database/table design. Let\'s assume the following: 1. The database must be designed for 65 000 employees. 2. Each employee has roughly about 1000 fields (columns). 3. 900 of the 1000 fields are of type \"float(16,2)\" (Salary, Tax deduction etc) 4. 50 of the 1000 fields are of type \"date\" (Date of Birth, Date Joined etc) 5. 50 of the 1000 fields are of type \"char\" (Surname, Inits, Address etc) I now sit with the following design options: A) One massive table 65 000 rows and 1000 columns where employee number is the unique primary key OR B) 3 tables with 65 000 000 rows and and 4 columns each col1 = auto-increment which is the unique primary key, col2 = employee number, (in other words about 1000 per employee) col3 = value description, (a field to identify what col4 is eg.\"Date of Birth\"), col4 = actual value (amount or date or char)... OR C) splitting the massive table into say 3 tables: - table 1: (dates) 65 000 rows, 51 cols where col 1 is employee number (unique, primary) and the remaining 50 the actual dates - table 2: (text) 65 000 rows, 51 cols where col 1 is employee number (unique, primary) and the remaining 50 the actual strings (surname, inits, address etc) - table 3: (amounts) 65 000 rows and 901 cols where col 1 is employee number (unique, primary) and the remaining 900 the actual amounts OR D) Same as C, but splitting table 3 into say 5 tables. Which of these would be the best design with the fastest access? I like option B), just worried about the (900*65 000) 58 500 000 rows... Any comments? Somebody please advise or refer me to a place where I can get help...! Thanks very much
  8. Hi, Apologies if this has been asked before... Is there a limit to the number of tables in a MySQL database? If one table has say 900 rows with not more than 30 columns, would I be able to accommodate 500+ tables in one MySQL database? (providing there\'s enough disk space obviously) Thanks for this NEAT site! Looks GREAT!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.