johnrage
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to pass the select value?Working now:
$query = “SELECT user_id FROM $wpdb->usermeta
WHERE (meta_value LIKE ‘%%$metavalue%%’)
AND (meta_key = ‘first_name’)
AND user_id IN (SELECT user_id FROM $wpdb->usermeta WHERE (meta_value= ‘doctor’) AND (meta_key = ‘description’))”;I found the post in this URL:http://wordpress.stackexchange.com/questions/28589/search-users-base-on-meta-value-meta-key
Forum: Fixing WordPress
In reply to: How to pass the select value?Thanks man, partially I got it working the search query. It retrieve now to the db and display results however I need to refine it further. The query displays all the names of the “doctor”. How could I extract the input string so that specific names only will appear in the results.
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. It makes the code much easier to read and follow. ]
<?php global $wpdb; $metavalue = $_GET['s']; $selectvalue = $_GET['select_pros']; if ($selectvalue == 'doctor') { //Query All Description with Doctor $att_qry = "SELECT * FROM $wpdb->usermeta WHERE meta_key='description' AND meta_value='doctor' LIKE meta_value='$metavalue%' "; $att_qry_results = $wpdb->get_results($att_qry); foreach ($att_qry_results as $att_qry_result) { //Query User Information $userinfo=get_userdata( $att_qry_result->user_id ); //Display Results echo ' <li>' . $userinfo->first_name . ' ' . $userinfo->last_name . '</li> '; } }Forum: Fixing WordPress
In reply to: How to pass the select value?Now I have my query below from my searchform.php and I get a blank result.
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
global $wpdb; $s=(isset($_GET['s'])); $query = mysql_query('SELECT * FROM usermeta WHERE $wpdb->description = $s'); while($row = mysql_fetch_array($query)){ echo $row[0] . ""; }Forum: Fixing WordPress
In reply to: How to pass the select value?Thanks for the quick response appreciated. Can you point me other detailed references how to work around with the search page that address to my questions above?
Forum: Fixing WordPress
In reply to: Editable Word/Excel in WordPressWell the plugin is not fit as to what I required. I am pretty sure there are few plugins or maybe a reference how to do this.
Forum: Fixing WordPress
In reply to: adding image in the recent post widgetI am not that good in adding codes. Do you have any example how the widget will appear in the right side bar?
Forum: Fixing WordPress
In reply to: adding image in the recent post widgetMy wordpress version 3.2.1
I don’t have any plugins that do this, just the built in wp widgets like recent post.
In any case, what plugins do you recommend to resolve my problem?
Forum: Themes and Templates
In reply to: Custom Field – ThumbnailsIvovic i have the same problem, did you fix?
Forum: Themes and Templates
In reply to: Solution: Sidebar moves down in IE but great in FFhow to create a sidebar-wrapper and how to apply it my class?
Forum: Fixing WordPress
In reply to: Sidebar issue in different browsers!where to find the #sidebar-wrapper. I have the same problem. My page looks fine in Firefox, however the page in IE looks weired.
Herewith is the link for your reference. A screenshot of the webpages in IE and Firefox.
Forum: Fixing WordPress
In reply to: Firefox and IE issue.. my site has different looksMany thanks what a great tool to validate css and html codings.