Jock's Profile
Reputation: 246
Excellent
- Group:
- Members
- Active Posts:
- 1,470 (1.98 per day)
- Joined:
- 15-May 10
- Profile Views:
- 8,593
- Last Active:
Yesterday, 06:27 PM- Currently:
- Viewing Topic: Cristiano Ronaldo - Funny
My Information
- Member Title:
- like a boss
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
Male
- Location:
- Scotland
- Interests:
- Olympic weightlifting, Rowing, Darts
Contact Information
- E-mail:
- Private
- Website URL:
-
http://jock.me.uk/
Latest Visitors
-
shopping-cart... 
Yesterday, 01:32 AM -
Dojcinovski 
15 May 2012 - 15:10 -
sash_oo7 
07 May 2012 - 23:51 -
Anusha 
03 May 2012 - 05:14 -
Ashley- 
30 Apr 2012 - 21:15 -
collie 
12 Apr 2012 - 18:35 -
webdesigner93 
02 Apr 2012 - 15:08 -
Guest
28 Mar 2012 - 16:41 -
j05hr 
23 Mar 2012 - 23:47 -
sbwsols 
12 Mar 2012 - 06:26
Posts I've Made
-
In Topic: Local server
24 May 2012 - 08:47 PM
-
In Topic: convert_tz returns null
24 May 2012 - 05:33 PM
Is the timezone table properly populated?
SELECT COUNT(*) FROM mysql.time_zone;
-
In Topic: Variables in a class - where and when to declare/set, and using in a function?
22 May 2012 - 03:21 PM
A 'variable' inside a class (called a class member variable) should have $'s otherwise PHP will probably assume they're constants. Next, the 'var' keyword is from PHP4 - get rid of it and start using public, private or protected to define the variable scope. Public can be accessed from anywhere, protected can only be accessed by a child or parent class, private can only be accessed from the class itself..
class FacebookProfile { private $password = '$3cr3tPassw0rD'; protected $birthday = '31/01/1990'; public $name = 'Jock'; }
The PHP docs on class member visibility explain this pretty well - http://www.php.net/m....visibility.php
Anyway onto your question: There is no standard way of defining variable values. Personally if I have default values, I will hard code them into the variable definition at the top of the class, rather than setting them within the constructor. When you need to access or edit a member variable, it's much better practice to use an Accessor/Mutator method, read more on this on wikipedia - http://en.wikipedia..../Mutator_method
It might look like hard work but an IDE like netbeans will automatically write getters/setters for you automatically. -
In Topic: questions about ir35 in the UK
12 May 2012 - 12:30 AM
Contractor here.
Ignore IR35, as jack said above you only need to worry about it if you set up as a LTD company and only have 1 main stream of income.
It wont effect you if you set up as a sole trader (you can be a Sole Trader and Full Time PAYE employee). You just need to declare your earnings via self assessment, and they will calculate your deductions at your tax bracket 20/40/50% e.g if you're in 20% bracket...
PAYE Pay £20,000.00 + Sole Trader earnings £5,000.00 - Tax £3,505.00 - NI £2,132.64 = £19362.36
Not bad vs the £15962.36 you would earn without the extra 5K freelance income. Your sole trader income is entitled to tax deductible expenses/loss too. -
In Topic: Show tables php syntax
12 May 2012 - 12:07 AM
I always thought the syntax was
"SHOW TABLES FROM `database_name`;"
Anyway, you just keep echoing the resource, you need to do something like...
$result = mysql_query($sql); while($table = mysql_fetch_row($result)) { echo $table[0]; }
Friends
-

Ben
-

sunwukung
-

webdesigner93
-

rallport
-

tonychang
-

planetabst...
-

MikeChipshop
-

adam007
-

ayoungh
-

Krannky
-

junior007
-

Neil Carpe...
-

atiprashant
-

Leon79
-

DaveJ
-

Rob Swan
-

oakleaves
Showing 18 random friends of 18
Help




Find My Content
Display name history
Comments
MikeChipshop
19 Oct 2011 - 19:33kingy da killa
23 Sep 2011 - 08:09dam im under for my standards gr. Ill catch up soon lol
proper on this gym thing!!!
kingy da killa
14 Sep 2011 - 14:50rubots
15 May 2011 - 15:24