Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
Today I thought about it, and I honestly don't know which is worse - their documentation or the actual code...
-
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
-
-
That was enabled at one time... I wonder what happened to it
-
I've updated the Facebook link, go nuts and like it!
-
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.
-
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.
-
This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=352164.0
-
An e-petition for the UK government to condemn SOPA and PIPA
Philip replied to joe92's topic in Miscellaneous
Nice find! -
Sadly, same here. The really really sad part to me, is this guy is from my district (or former district, before I moved.)
-
php freaks sopa/pipa acknowledgement
Philip replied to AyKay47's topic in PHPFreaks.com Website Feedback
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. -
Hmm thanks. Will take a look into it!
-
Better get your homework done tonight
-
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?
-
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.
-
Are you going to blackout my website for doing so?
-
I like it to give to clients and be like "have fun!", but I hate coding for it
-
-
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.
-
Your domain registrar usually has an option (most of the time it costs $$) for 'private registration'
-
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]"
-
CAPTCHA....Ya killin' me smalls!
Philip replied to austinlikesdubstep's topic in PHPFreaks.com Website Feedback
Yeah, its 10 posts. Gotta love what the world of spam has done to us.