33 reputation
8
bio website madebylars.nl
location
age
visits member for 1 year, 9 months
seen Sep 28 '13 at 20:13

Aug
6
awarded  Popular Question
May
29
awarded  Supporter
May
29
accepted making php value numeric
May
29
comment making php value numeric
I replaced it with $clauses['orderby'] = " {$wpdb->terms}.name+0 "; $clauses['orderby'] .= ( 'DESC' == strtoupper( $wp_query->get('order') ) ) ? 'ASC' : 'DESC'; It didn' work with the following line attached, but when I deleted it it works like a charm! Thanks! $clauses['orderby'] = ", {$wpdb->posts}.post_title ASC ";
May
28
comment making php value numeric
It seems irrelevent code. What I want is to sort the query by 'beheersnummer'. This is a numerical value that is stored in the custom taxonomy 'beheersnummer'. This code seems to be looping over ALL taxonomies, but I only need 'beheerseenheidnummer. Unfortunately, my knowledge of MySQL is too limited to adjust it.
May
28
comment making php value numeric
SELECT t.*, tt.*, tr.object_id FROM tool_terms AS t INNER JOIN tool_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN tool_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('beheerseenheidnummer', 'anderesubsidieovereenkomstnummer') AND tr.object_id IN (730, 779, 805, 811, 814, 817, 818, 1641, 1642, 1645, 1646, 1677, 1681, 1804, 1814, 1815, 2093, 2094, 2129, 2130, 2197, 2262, 2283, 2284, 2358, 2370) ORDER BY t.name ASC
May
28
comment making php value numeric
SELECT tool_posts.* FROM tool_posts LEFT OUTER JOIN tool_term_relationships ON tool_posts.ID=tool_term_relationships.object_id LEFT OUTER JOIN tool_term_taxonomy USING (term_taxonomy_id) LEFT OUTER JOIN tool_terms USING (term_id) WHERE 1=1 AND tool_posts.post_type = 'landschapselement' AND (tool_posts.post_status = 'publish' OR tool_posts.post_status = 'draft' OR tool_posts.post_status = 'pending' OR tool_posts.post_status = 'private') AND (taxonomy = 'beheerseenheidnummer' OR taxonomy IS NULL) GROUP BY object_id ORDER BY GROUP_CONCAT(tool_terms.name ORDER BY name ASC) ASC
May
27
comment making php value numeric
How can I do that?
May
27
comment making php value numeric
Actually I can't, it's not my own code. It works perfectly, except it doesn't sort 'naturally' (see intro). The thing I am wondering about is why this wouldn't work: $clauses['orderby'] = "GROUP_CONCAT({$wpdb->terms}.name ORDER BY name+0 ASC) ";
May
27
comment making php value numeric
$clauses['orderby'] = "GROUP_CONCAT({$wpdb->terms}.name ORDER BY name+0 ASC) "; $clauses['orderby'] = "GROUP_CONCAT({$wpdb->terms}.name ORDER BY name*1 ASC) "; And the other ones, they all don't work in this situation.
May
23
asked making php value numeric
Apr
1
awarded  Tumbleweed
Mar
27
comment Passing multiple variables through url (php)
I've found another way, using areal-agro.nl/tool/?page_id=780&amp;user=<?php echo get_the_ID() . '.' . $current_aanvraag_id ;?> and $doorgekregenuser = $_GET['user']; if ($doorgekregenuser != ''){ $doorgekregeninfo = explode('.', $doorgekregenuser); update_usermeta( $current_user->id, 'current_user', get_the_title($doorgekregeninfo[0]) ); update_usermeta( $current_user->id, 'current_aanvraag', get_the_title($doorgekregeninfo[1]) ); }
Mar
27
comment Passing multiple variables through url (php)
It seems to be the problem that my variables are named incorrectly? The user variable works, but the aanvraag variable doesn't.. Still don't get it
Mar
27
comment Passing multiple variables through url (php)
What would it look like to declare custom variable 'aanvraag' and 'user'?
Mar
27
comment Passing multiple variables through url (php)
I am now passing only the post_ID, but that also fails: www.areal-agro.nl/tool/?page_id=780&user=724&aanvraag=725
Mar
27
accepted Passing multiple variables through url (php)
Mar
27
comment Passing multiple variables through url (php)
If I pass the right value directly in the variable, it does work. $doorgekregenaanvraag = 'aanvraag van Geling H. te Oploo op 6 februari 2013 om 11:16 op 14 maart 2013 om 11:17';
Mar
27
asked Passing multiple variables through url (php)
Mar
25
accepted best way to communicate between php and jquery/javascript