Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. And to lose all static that you may be carrying
  2. Damn, you beat my high score. I wrote a quick java robot program to click on the screen for 10 seconds... got a couple thousand. Great minds think alike? LOL I had the same idea until I discovered that I could enter my own. Edit: apparently I am no longer the only one who discovered that you can manipulate the game easily.
  3. I think you need to think some more about security I just beat your high-score with 999999999999999999999999999999999999999999999999
  4. They are not mutually exclusive. A Service Layer could use a Data Mapper for example. A Service Layer encapsulates your services like a Facade encapsulates your sub-system(s).
  5. Non-functional is sometimes referred to as Technical Requirements and in some cases it's just everything else that is not part of the Functional Requirements document. A view of used requirements: http://www.usabilityfirst.com/about-usability/requirements-specification/
  6. No with both keys are primary I really meant both keys are primary. Primary has nothing to do with whether they auto_increment or not. CREATE TABLE animal_show ( animal_id INT UNSIGNED NOT NULL, show_id INT UNSIGNED NOT NULL, PRIMARY KEY (animal_id, show_id) );
  7. No you are correct! The number 306150 remains constant because you don't subtract anything from it. And how do you kill a Black Demon 0.0149175240895 or 0.403253307202 times?
  8. 1. Each exhibitor can have multiple animals You have turned this relation the other way around as it should be: exhibitor (exhibitor_id, ..) animal (animal_id, exhibitor_id) I assume each show also has multiple animals: animal (animal_id, ..) show (show_id, ..) animal_show (animal_id, show_id) both keys in animal_show are primary, that is, assuming each show is present only once in the shows table (on a different date) otherwise you'll have to add a date column to the table as part of the primary key. Same as with 2 (same assumptions) show (show_id) winner (winner_id) show_winner (show_id, winner_id)
  9. Hi James, Sorry for my vague answer by: I meant highlight the link of the page you are currently on. Also add a breadcrumb or remove the sub-navigation. If I land on one of your page when coming from Google I have no idea where I am.
  10. You can as easily write the application in procedural as you can in OOP, it's all just a matter of preference and opinion.
  11. You shouldn't worry about micro-optimization because it won't help you if: 1) you have a query on a big table with wrong indexes 2) you used the wrong engine for your table so it locks up every time someone writes to it .. Analyze your code under load, find bottlenecks and solve them!
  12. So if users always need to use prepared statements then why is it possible to execute a query that doesn't use them? You should only use prepared statements when you are to execute the same query multiple times with different variables. Using prepared statements merely to avoid SQL injection is over-kill as you could escape it easily yourself in the provided interface.
  13. Great work on the website and the class with a few remarks on the latter: 1) UseSQL would possibly be more useful if you allowed it to connect to more RDBMS then only MySQL (eg. extend PDO and make it a Database Abstraction Layer) 2) Don't mix HTML into your class 3) Use Exception's instead of letting your class handle any and all error's 4) Nearly no data is being filtered before being written to the database exposing anyone who uses your class to SQL injection 5) You assume an "id" convention, bare in mind that not everyone uses pseudo-keys Nevertheless I applaud your effort, keep up the good work!
  14. If the above view is your vision on PHP programming then helping you is the worst thing one can do. Buy a book and learn PHP first you are a long way from home.
  15. header("Location:" . $xml->result[0]->redirect_url);
  16. Yes, but this will only work with IE and you'll also need a good dose of VBA to pull it off.
  17. How: SHOW TABLES FROM <database>; SHOW CREATE TABLE <table>; SHOW COLUMNS FROM <table>; What: Use mysql_unbuffered_query() to read the row and insert the row into the new table on the remote host.
  18. <input type="submit" name="action" value="Preview"> <input type="submit" name="action" value="Save"> <input type="submit" name="action" value="Delete Post"> <?php echo $_POST['action']; // Preview, or Save, or Delete Post ?> Not sure if this works cross-browser.
  19. ignace

    zf routes

    In your .htaccess create a 301 redirect from / to /index I'll have to see your full code of your IndexController and your Routes in order to be able to give you a different answer.
  20. ignace

    Versioning

    Too bad you can't create a MySQL partition and tell MySQL to store all revisions on the other partitions
  21. Everything depends on how you want to use the data. Most certainly you want to avoid people specify invalid class names so your database should be something like: CREATE TABLE Classes ( class_id VARCHAR(32) NOT NULL, -- class name PRIMARY KEY (class_id) ) ENGINE=INNODB; CREATE TABLE Characters ( character_id VARCHAR(32) NOT NULL, -- character name class_id VARCHAR(32) NOT NULL, .. PRIMARY KEY (character_id), FOREIGN KEY (class_id) REFERENCES Classes (class_id) ON UPDATE CASCADE ) ENGINE=INNODB; If you are playing against a specific version then you could use: CREATE TABLE Characters ( character_id VARCHAR(32) NOT NULL, -- character name class_id ENUM('<class-id-1>','<class-id-2>') NOT NULL, .. PRIMARY KEY (character_id) ) ENGINE=INNODB; This makes it easy to manage it from a back-end. The first example will allow you to easily also add classes the second one doesn't and will make it costly to do so. I do not recommend using a config file instead you could use: class RaceClass { private $validClasses = array( .. ); }
  22. ignace

    zf routes

    Why do you need to have everything in the IndexController? If you create a controller for each of those you already have the desired result and closer to a correct implementation: class FooController extends Zend_Controller_Action { function indexAction() {} } class BarController extends Zend_Controller_Action { function indexAction() {} } domain.top/foo domain.top/bar
×
×
  • 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.