Code: Select all
if (strpos($data[CallType],"VOLOCITY")) { $sql_insert_reporting ="INSERT INTO hs_request_reportingtags (xRequest,xReportingTag) VALUES ($data[No],30)";
$ins_result_reporting = mysql_query( $sql_insert_reporting, $dbconn );
if (!$ins_result_reporting)
{echo mysql_error();} }So when my script runs $data[CallType] contains VOLOCITY INSTALL.
When it gets to the IF statement it equates to false and no record is inserted but I know for the one test record I have it should equate to true and insert a record.
If I change the value of CallType so there is a space before VOLOCITY the IF statement runs? Am I completly missing how STRPOS works and should I be using somehting else?
This is quite urgent, this minor problem is holding up a big data import I am trying to get done before some staff get in.
Please help.
Regards
Jim