Questions tagged [get-row]
The get-row tag has no usage guidance.
11 questions
5
votes
1
answer
7k
views
ACF Repeater loops and resets - where is the reset_rows() documentation? [closed]
I love ACF, its great for developers and it seems to have so much support. BUT... Why is reset_rows() not in the documentation? I created a function that can delete repeater rows at different times in ...
1
vote
1
answer
294
views
Get a row from a separate table by matching a posts meta_key to a tables ID column
I am trying to match a posts meta_key value to a separate tables column ID and call that row/array in the single-listing.php.
I have a meta_key value that is called dot_number. The table is called ...
0
votes
1
answer
1k
views
Best practice to limit results in get_row()?
This is my query to check if a title exists (it's in a loop, therefore [$i]).
$wpdb->get_row("SELECT * FROM wp_posts WHERE post_title = '" . $titles_arr[$i] . "'", 'ARRAY_A');
Anyway, I would ...
0
votes
1
answer
2k
views
Querying specific table row by current user login
I m creating a user based website in Wordpress, where each users can create an account and upload data of their records into the website. But I m having trouble thinking of how users can view a ...
0
votes
1
answer
707
views
Handling repeater data
I am currently trying to create a drop down feature with the repeater custom field input. This may or may not be the right custom field to be used but it seems like it is given the other offered ...
0
votes
2
answers
1k
views
Show post thumbs in rows instead of columns
I am displaying only thumbs and title on index pages using following code;
<div id="column1">
<?php query_posts('cat=22&showposts=2'); ?>
<?php $posts = get_posts('cat=22&...
0
votes
1
answer
206
views
Trouble with SQL SELECT inside switch_to_blog()
I'm using switch_to_blog() and restore_current_blog() to perform some functions across a multi site install. One of the things I'm trying to do is select a very specific post using get_row(). My ...
0
votes
2
answers
5k
views
wpdb get_row database query inquiry
Is this the right way to use get_row with a select *?
$_crds = $wpdb->get_row($wpdb->prepare(" SELECT * FROM `mailers` WHERE `id` = %d", $_GET['caId'] ));
$_zipcodes = $_crds->zipcodes;
$...
0
votes
1
answer
2k
views
Why is an empty result an error? ( $wpdb->get_row )
I have a query where I get the highest id from a table.
$user_id = $wpdb->get_row("SELECT * FROM $table WHERE id=(SELECT MAX(id) FROM $table)")
The table should always have rows, but if for some ...
0
votes
2
answers
3k
views
get_row returns empty when data exists
I am trying to run the following query to access my WP cf7dbplugin_submits table but it keeps coming up empty. I have added my table into wp-db.php model as such:
Added the contact form table- ...
-3
votes
1
answer
2k
views
Display posts in row Horizontally [closed]
On index.php page, I am showing only thumbs and two custom fields. How can I set specific number of posts in one row like this one; http://www.whatmobile.com.pk