Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. Today I thought about it, and I honestly don't know which is worse - their documentation or the actual code...
  2. Philip

    one ..

    You'd be surprised at the amount of software that phones home. Most are usually good about asking before hand though. I will say this though - I'm quite OK with that. If I visit my own site a few times, and Googlebot comes and takes a peek, that makes me happy
  3. That was enabled at one time... I wonder what happened to it
  4. I've updated the Facebook link, go nuts and like it!
  5. Be aware that normally with those sites, if you don't sell it exclusively on their site you get even less profit. For example, with Themeforest you typically get about half to 3/4 the profit by selling the items exclusively... whereas if you if you don't, then you only get about a third of the profit.
  6. According to the ZF Coding Standards, no... no spaces. Personally, I have to agree with it. If you have something as complex as <?php function($parm1, $parm2, round(($upper+$lower)/2+0.5)); I'd be setting that as a var before passing it into a function call - but thats just me.
  7. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=352164.0
  8. Sadly, same here. The really really sad part to me, is this guy is from my district (or former district, before I moved.)
  9. Oh the irony.
  10. I'd like to know what some of the congressmen are thinking when they went online today.
  11. If SOPA were to pass, that blackout screen we added would be a very real possibility. It's scary to think that, but it's true. If one person were to post a link to a site that had a copyrighted song (even if it was a link to a Youtube video or something), our site could be blacklisted for a while. The theory "guilty until proven innocent" is what these bills are trying to say, when it should be the other way around. If you live in the US, contact your representatives, tell them why this is so wrong. Don't know where to go to do so? You can use the link we provided to Google's page. Don't live in the US? Encourage your American buddies to stand up and fight these bills. These bills will still affect you, even if you don't live in the US.
  12. Hmm thanks. Will take a look into it!
  13. Better get your homework done tonight
  14. I'm interested to see how others handle revision history within a database (specifically MySQL.) Let's say I have this (rather simple) table that I want to store a revision history on: mysql> describe table; +-------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+----------------------+------+-----+---------+----------------+ | id | smallint(5) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(125) | YES | | NULL | | | email | varchar(360) | YES | | NULL | | +-------+----------------------+------+-----+---------+----------------+ I've seen the following ways to do store revisions, but which do you think is the best? Store the revision data in one table, and the current data in another mysql> describe live_table; +-------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+----------------------+------+-----+---------+----------------+ | id | smallint(5) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(125) | YES | | NULL | | | email | varchar(360) | YES | | NULL | | +-------+----------------------+------+-----+---------+----------------+ Then the revision data (where item_id links to id in the table above): mysql> describe revision_table; +-----------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+------------------+------+-----+---------+----------------+ | revision_id | int(10) unsigned | NO | PRI | NULL | | | item_id | smallint(6) | NO | PRI | NULL | | | name | varchar(125) | YES | | NULL | | | email | varchar(360) | YES | | NULL | | | changed_user_id | smallint(6) | YES | | NULL | | | changed_date | timestamp | YES | | NULL | | +-----------------+------------------+------+-----+---------+----------------+ This method requires a few more queries I would think: copying the current row into the revision table (including upping the revision_id from the previous revision in the revision_table) and then inserting new data. Store all of the data in one table mysql> describe table; +-----------------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+----------------------+------+-----+---------+----------------+ | revision_id | int(10) unsigned | NO | PRI | NULL | | | item_id | smallint(6) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(125) | YES | | NULL | | | email | varchar(360) | YES | | NULL | | | changed_user_id | smallint(6) | YES | | NULL | | | changed_date | timestamp | YES | | NULL | | +-----------------+----------------------+------+-----+---------+----------------+ And then just select the item_id/highest revision_id to get the current row. Same approach as the first, but store the data in one field (using serialize/json_encode) mysql> describe live_table; +-------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+----------------------+------+-----+---------+----------------+ | id | smallint(5) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(125) | YES | | NULL | | | email | varchar(360) | YES | | NULL | | +-------+----------------------+------+-----+---------+----------------+ Then the revision data (where item_id links to id in the table above): mysql> describe revision_table; +-----------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+------------------+------+-----+---------+----------------+ | revision_id | int(10) unsigned | NO | PRI | NULL | | | item_id | smallint(6) | NO | PRI | NULL | | | data | text | YES | | NULL | | | changed_user_id | smallint(6) | YES | | NULL | | | changed_date | timestamp | YES | | NULL | | +-----------------+------------------+------+-----+---------+----------------+ Or am I way off-track?
  15. In that case, I'd wait until he gets back to talk to him about it. Otherwise you might create extra tension for what he might see as going behind his back.
  16. Are you going to blackout my website for doing so?
  17. I like it to give to clients and be like "have fun!", but I hate coding for it
  18. How long until he gets back? If it is like months then I'd go to someone else, but if its just a few days, I'd wait.
  19. Your domain registrar usually has an option (most of the time it costs $$) for 'private registration'
  20. I'd personally not say anything about flaws, but something more along the lines of "I'd like to help improve the website by doing some performance tweaks to the code base which would cut down on the number of help [tickets/emails/etc]"
  21. Sadly, I don't think it will be the last time we see this bill. It'll probably get hidden in with another bill somewhere, under the radar.
  22. Yeah, its 10 posts. Gotta love what the world of spam has done to us.
×
×
  • 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.