Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Search with more than one condition
Hello, I'm trying to perform a search with 2 conditions, something like
SELECT * from ItemSearchBasic WHERE isInactive = "True" and itemId LIKE "'.$ranaitem.'%"
I'm using the code below but is not working, can somebody help me?
Thanks
require_once 'PHPtoolkit.php';
require_once 'login_info.php';
$ranaitem = $_POST['ranaitem'];
$myNSclient->setSearchPreferences(false, 100);
$itemSearch = new nsComplexObject("ItemSearchBasic");
$itemSearch->setFields(
array("isInactive" => array("operator" => 'equalTo',
"searchValue"=> 'True')) ,
array("itemId" => array("operator" => 'startsWith',
"searchValue"=> $ranaitem))
);
$searchResponse = $myNSclient->search($itemSearch);
$totalRecords = $searchResponse->totalRecords;
if ($totalRecords > 0)
{
foreach ( $searchResponse->recordList as $record )
{
// show info