Justin,
To query the entry data using the created_by field, you can use the following SQL statement.
[sql]
SELECT l.*, field_number, value
FROM wp_rg_lead l
INNER JOIN wp_rg_lead_detail ld ON l.id = ld.lead_id
WHERE l.created_by=%d
The only caviat is that this won't return you the data organized the way the entry object is.
To do that you would need to make a call to RGFormsModel::build_lead_array(...);
$entries = RGFormsModel::build_lead_array($results, true);
The problem is that this method is private. I am not opposed to making it public as I can see it being useful in situations like this, but you will need to get a dev version of Gravity Forms from me. If you are interested, just email me at alex@rocketgenius.com and I will send it your way.
Posted 13 years ago on Tuesday June 28, 2011 |
Permalink