Search found 7 matches
- Wed Mar 05, 2008 3:49 pm
- Forum: Joombie Coding Q/A
- Topic: SQL query to calculate age from birthdate
- Replies: 3
- Views: 771
Re: SQL query to calculate age from birthdate
Ok gotten a bit further: SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS('2008-06-13') - TO_DAYS(cb_geboortedatum)), '%Y') + 0 AS Age FROM #___comprofiler WHERE id = ". $my->id; I'm using this script to enter some data in the fields of a form: <?php global $database,$my; $query = "SELECT cb_roepnaam ...
- Tue Mar 04, 2008 10:31 pm
- Forum: Joombie Coding Q/A
- Topic: Calling from data base for form; almost solved, help?
- Replies: 0
- Views: 276
Calling from data base for form; almost solved, help?
I'm calling info from the database to autofill some fields in Facile Forms. I enter the code as value, and it works great. Now i need to do this in an advanced manner... the original code: <?php global $database,$my; $query = "SELECT cb_roepnaam FROM #__comprofiler WHERE id = ". $my->id; $...
- Sun Feb 24, 2008 11:08 pm
- Forum: Joombie Coding Q/A
- Topic: Customising a component: call a username
- Replies: 5
- Views: 727
Re: Customising a component: call a username
thanks i'll try it at once!
- Sun Feb 24, 2008 7:03 pm
- Forum: Joombie Coding Q/A
- Topic: Customising a component: call a username
- Replies: 5
- Views: 727
Re: Customising a component: call a username
Hey stu, thanks for the first step ... I tried copying that in the php doc...and got an error: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in D:\Website\xampp\htdocs\nedgolfvet\components\com_linx\linx.php on line 203 Guess I should have done something different? (maybe a ...
- Thu Feb 14, 2008 1:20 pm
- Forum: Joombie Coding Q/A
- Topic: SQL query to calculate age from birthdate
- Replies: 3
- Views: 771
Re: SQL query to calculate age from birthdate
Code: Select all
SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS('2008-6-13') - TO_DAYS(cb_geboortedatum)), '%Y') + 0 AS Age
FROM jos_comprofiler
WHERE id = $userid;
$user = &JFactory::getUser();
$userid = $user->id;
would this be correct then?
- Thu Feb 14, 2008 2:50 am
- Forum: Joombie Coding Q/A
- Topic: SQL query to calculate age from birthdate
- Replies: 3
- Views: 771
SQL query to calculate age from birthdate
I'm using Community builder, and want to use info from it's database to add the age to a form ( getting the query in the form is a step i'll worry about later... I did some searching, and did find statements to calculate age from birthdate today, but what i'm looking for is to calculate the age from...
- Wed Feb 13, 2008 11:08 pm
- Forum: Joombie Coding Q/A
- Topic: Customising a component: call a username
- Replies: 5
- Views: 727
Customising a component: call a username
I'm working with Linx a links submission component, which is great but I'd like to modify it slightly: where it asks you to enter your name in a field, i'd like it to hard code the users (user)name: This is from the php file and creates the fields to fill stuff in: $recip_url = mosGetParam( $_REQUES...