starter
Joined: 21 Aug 2013
Posts: 32
|
|
Back to top |
|
|
Michael
Jamroom Team
Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo
|
Posted: 10/04/13 22:22 |
|
This looks like the easiest way to me:
Code | $_sp = array(
'search' => array(
"user_language = en-US",
"profile_quota_id = 1"
)
);
$_rt = jrCore_db_search_items('jrProfile', $_sp); |
See if it returns the results your looking for. to print to the screen, i like:
Code | #############Debugging#############
//todo remove this debuggin text
print '<div style="text-align:left"><pre>';
print_r($_rt);
print '</pre></div>';
#############Debugging############# |
and if you need that wrapped in a function, in your modules index.php file:
Code |
function view_xxYourModule_something($_post, $_user, $_conf)
{
echo 'hello world.';
// Make sure they have not submitted before
$_sp = array(
'search' => array(
"user_language = en-US",
"profile_quota_id = 1"
)
);
$_rt = jrCore_db_search_items('jrProfile', $_sp);
#############Debugging#############
//todo remove this debuggin text
print '<div style="text-align:left"><pre>';
print_r($_rt);
print '</pre></div>';
#############Debugging#############
}
|
access it from:
yoursite.com/yourmodule/something
_________________ Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center |
|
Back to top |
|
|
starter
Joined: 21 Aug 2013
Posts: 32
|
|
Back to top |
|
|
Michael
Jamroom Team
Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo
|
Posted: 10/04/13 23:08 |
|
starter: | If i need to connect with other module like jrAudio, jrComment etc , will it work?
or shall i add the module names in argument list like this jrCore_db_search_items('jrProfile,jrAudio, jrComment', $_sp); |
Best way to find out if it will work is if you try-and-see, i dont know off the top of my head.
dont add all the module names with commas, i dont think that will work. I've never seen anything like that in the code anywhere.
Try putting the name of the module of the things you want returned in there.
so if you want a list of profiles:
jrCore_db_search_items('jrProfile', $_sp);
if you want a list of audio files:
jrCore_db_search_items('jrAudio', $_sp);
if you want a list of images:
jrCore_db_search_items('jrImage', $_sp);
Your asking "get me a list of items where......." so I think the module is the type of items your after.
_________________ Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center |
|
Back to top |
|
|
|