本文整理汇总了PHP中executeSQL函数的典型用法代码示例。如果您正苦于以下问题:PHP executeSQL函数的具体用法?PHP executeSQL怎么用?PHP executeSQL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了executeSQL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateDBNo
function updateDBNo($NewNumber, $db)
{
global $SQLFile;
if (!isset($SQLFile)) {
$sql = "UPDATE config SET confvalue='" . $NewNumber . "' WHERE confname='DBUpdateNumber'";
executeSQL($sql, $db);
$_SESSION['DBUpdateNumber'] = $NewNumber;
}
}
示例2: createUser
function createUser($user, $pwd)
{
$insertSQL = "INSERT INTO user(email, passwd) VALUES(\"{$user}\", \"{$psw}\")";
$result = executeSQL($insertSQL);
if (!$result) {
echo "<script>alert('创建用户失败,请稍候再试!'); history.go(-1);</script>";
return false;
}
return true;
}
示例3: isAddressDefault
include "includes/function.php";
//Get the query string and complete the SQL query
$user_id = $user_info_id = "";
if (isset($_POST['person_id'])) {
$user_id = $_POST['person_id'];
}
if (isset($_POST['address_id'])) {
$user_info_id = $_POST['address_id'];
}
// Generate the query
if ($user_id != "" && $user_info_id != "") {
//if default address, update with default empty no_address
$default_address = isAddressDefault($user_info_id);
if (!$default_address) {
// Delete the customer's information
$req_delete = "DELETE FROM " . constant('_VM_TABLE_PREFIX_') . "_user_info WHERE user_id=" . $user_id . "";
echo executeSQL($req_delete);
} else {
// Update the default address
$address = "no_adress";
$zip = "no_zip";
$city = "no_city";
$country = "no_country";
$street = "no_street";
$addressUpdateQuery1 = sprintf("UPDATE " . constant('_VM_TABLE_PREFIX_') . "_user_info SET\n " . $_PERS_PARAMS_MAPPING['address'] . "=%s, \n " . $_PERS_PARAMS_MAPPING['zip'] . "=%s,\n " . $_PERS_PARAMS_MAPPING['city'] . "=%s, \n " . $_PERS_PARAMS_MAPPING['country'] . "=%s\n WHERE user_info_id=%s ", GetSQLValueString($address, "text"), GetSQLValueString($zip, "text"), GetSQLValueString($city, "text"), GetSQLValueString($country, "text"), GetSQLValueString($user_info_id, "int"));
echo executeSQL($addressUpdateQuery1);
}
} else {
echo '\\nInvalid query: No parameter given!';
}
mysql_close();
示例4: ms_gc
function ms_gc($sesslt)
{
$tStamp = time() - $sesslt;
return executeSQL("DELETE FROM currentsession WHERE laccess < '{$tStamp}'");
}
示例5: executeSQL
exit;
}
if ($_POST['includedata'] == "include") {
executeSQL("insert ws_rate_" . $_POST['newtable'] . " select * from " . $_POST['source'] . " order by areacode;");
}
}
if ($_POST['action'] == "newcost") {
$resultado = mysql_query("show tables like ws_cost_'" . $_POST['newtable'] . "';");
if (mysql_num_rows($resultado) > 0) {
echo "<font size=4>Ya existe una tabla con ese nombre (" . $_POST['newtable'] . "), por favor retroceda y cambie el nombre.";
exit;
}
$resultado = mysql_query("create table ws_cost_" . $_POST['newtable'] . " like " . $_POST['source'] . ";");
if (!$resultado) {
echo "<font size=6 color='red'>Ha habido un error creando la nueva tabla, por favor dirígase al administrador del sistema";
exit;
}
if ($_POST['includedata'] == "include") {
executeSQL("insert ws_cost_" . $_POST['newtable'] . " select * from " . $_POST['source'] . " order by areacode;");
}
}
function executeSQL($sql)
{
$resultado = mysql_query($sql) or die("\n <html>\n <head>\n <meta http-equiv=\"refresh\" content=\"5; url = create_ratetable.php\" />\n </head>\n <body bgcolor=\"#1C2D67\">\n <br>\n <font face=\"Verdana\" color=\"#FF0000\" size=\"12\">\n <center>\n There was an error executing your request. <br>\n Please contact the system administrator\n </center>\n </font>\n <br>\n " . mysql_error() . "</body>");
if ($resultado) {
print "\n <html>\n <head>\n <meta http-equiv=\"refresh\" content=\"5; url = create_ratetable.php\" />\n </head>\n <body bgcolor=\"#1C2D67\">\n <br>\n <font face=\"Verdana\" color=\"White\" size=\"4\">\n <center>\n Your request has been executed successfully. <br>\n You are being redirected to the main page.\n </center>\n </font>\n <br>\n </body>";
}
}
?>
</body>
</html>
示例6: getQueryData
$userid = getQueryData('userid');
$sql = "select id from tbl_user a where a.userid= '" . $userid . "'";
$userid = executeScalar($db, $sql);
$data = getQueryData('data');
$data = json_decode($data, true);
$servicename = executeScalar($db, "select servicename from tbl_service where delete_flag=0 and id=" . correctSQL($data["service"]));
$sql = "insert into tbl_user_status (userid, serviceid, servicename, unitprice, unittype, start_date, end_date, charge, balance, payment, memo, create_id, create_date, update_id, update_date) values (" . correctSQL($userid) . "," . correctSQL($data["service"]) . "," . correctSQL($servicename) . "," . correctSQL($data["unitprice"], 1) . "," . correctSQL($data["unittype"], 1) . "," . correctSQL(substr($data["start_date"], 0, 10)) . "," . correctSQL(substr($data["end_date"], 0, 10)) . "," . correctSQL($data["charge"], 1) . "," . correctSQL($data["balance"], 1) . "," . correctSQL($data["payment"], 1) . "," . correctSQL($data["memo"]) . "," . correctSQL($login_id) . "," . "now() ," . correctSQL($login_id) . "," . "now());";
executeSQL($db, $sql);
responseData(true, null);
break;
case 'userstatus_update':
$data = getQueryData('data');
$data = json_decode($data, true);
$return = array();
$sql = "update tbl_user_status set memo=" . correctSQL($data["memo"]) . " where delete_flag=0 and id=" . correctSQL($data["id"]);
executeSQL($db, $sql);
responseData(true, null);
break;
case 'viewhistory_list':
$userid = getQueryData('userid');
$sql = "select b.name as channelname, a.start_time, a.end_time from tbl_user_history a, tbl_channel b\r\n\t\t\t\t\t\t\twhere a.userid='" . $userid . "' and a.channelid = b.id and a.delete_flag=0\r\n\t\t\t\t\t\t\torder by start_time desc limit 100";
$result = querySQL($db, $sql);
$data = array();
while ($row = mysql_fetch_assoc($result)) {
$data[] = $row;
}
responseData(true, null, $data);
break;
case 'user_csvdownload':
$sql = "\r\n\t\t\t\t\tselect \r\n\t\t\t\t\t\ta.userid,\r\n\t\t\t\t\t\ta.fullname as name,\r\n\t\t\t\t\t\ta.password,\r\n\t\t\t\t\t\tcase a.type\t when 1 then 'BOX' when 2 then 'MINI' else 'PBOX' end as type,\r\n\t\t\t\t\t\tcase substr(a.flag, 1, 1) when '1' then 'ON' else 'OFF' end as vodflag,\r\n\t\t\t\t\t\ta.tel,\r\n\t\t\t\t\t\ta.email,\r\n\t\t\t\t\t\ta.identitycard,\r\n\t\t\t\t\t\ta.address,\r\n\t\t\t\t\t\tcase a.status when 1 then 'ON' else 'OFF' end as status,\r\n\t\t\t\t\t\tcase a.money_status when 1 then 'ON' else 'OFF' end as money_status,\r\n\t\t\t\t\t\ta.memo,\r\n\t\t\t\t\t\te.meetingcount,\r\n\t\t\t\t\t\ta.macid,\r\n\t\t\t\t\t\td.servicename,\r\n\t\t\t\t\t\td.point as balance,\r\n\t\t\t\t\t\tdate_format(d.start_date, '%Y-%m-%d') as start_date,\r\n\t\t\t\t\t\td.expire_time as end_date,\r\n\t\t\t\t\t\t(case when d.expire_time is null then 0 when d.expire_time = 'free' then null else datediff(d.expire_time, now()) + 1 end) as remain_day,\r\n\t\t\t\t\t\td.payment,\r\n\t\t\t\t\t\tb.name as store_name,\r\n\t\t\t\t\t\tc.name as emp_name,\r\n\t\t\t\t\t\ta.create_id,\r\n\t\t\t\t\t\ta.create_date\r\n\t\t\t\t\tfrom tbl_user a left outer join\r\n\t\t\t\t\t\ttbl_agent_store b on a.agentstoreid=b.id left outer join\r\n\t\t\t\t\t\ttbl_agent_emp c on a.agentempid=c.id left outer join\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\tselect \r\n\t\t\t\t\t\t\t\t*,\r\n\t\t\t\t\t\t\t\tfn_balance_param(serviceid, unitprice, unittype, balance, start_date) as point,\r\n\t\t\t\t\t\t\t\tfn_expiretime_param(serviceid, unitprice, unittype, end_date) as expire_time\r\n\t\t\t\t\t\t\tfrom \r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tselect * from tbl_user_status where delete_flag=0 order by update_date desc\r\n\t\t\t\t\t\t\t) a group by userid\r\n\t\t\t\t\t\t) d on a.id=d.userid left outer join\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\tselect userid, count(*) as meetingcount from tbl_user_meeting where delete_flag=0 group by userid \r\n\t\t\t\t\t\t) e on a.id=e.userid\r\n\t\t\t\t\twhere a.delete_flag=0 and a.userid != 'anonymous'\r\n\t\t\t\t";
$where = "";
示例7: querySQL
$result = querySQL($conn, $sql);
$row = mysql_fetch_array($result);
$start_date = $row["start_date"];
$now = date("Y-m-d");
$end_date = $row["end_date"];
$days = ceil((strtotime($now) - strtotime($start_date)) / (60 * 60 * 24));
$y = intval(substr($start_date, 0, 4));
$m = intval(substr($start_date, 5, 2));
$d = intval(substr($start_date, 8, 2));
$start_date = date('Y-m-d', mktime(0, 0, 0, $m, $d + $days, $y));
$y = intval(substr($end_date, 0, 4));
$m = intval(substr($end_date, 5, 2));
$d = intval(substr($end_date, 8, 2));
$end_date = date('Y-m-d', mktime(0, 0, 0, $m, $d + $days, $y));
$sql = 'update tbl_user_status' . ' set start_date=' . correctSQL(substr($start_date, 0, 10)) . ' , end_date=' . correctSQL(substr($end_date, 0, 10)) . ' where userid=' . $uid . ' and delete_flag=0';
executeSQL($conn, $sql);
}
}
// set session data
saveLoginInfo($userid, $macid);
}
// get serviceid, expiretime
$row = getUserServiceInfo($conn, $uid);
if ($row == null) {
invalidUser();
}
if ($row["expiretime"] == null || $row["serviceid"] == null) {
expiredUser($userid);
}
$expiretime = $row["expiretime"];
$remainday = intval($row["remainday"]);
示例8: import
/**
*
*Restaure depuis un fichier texte la base de donnees courante.
*
** @param repertoire string
* <p>Nom du repertoire dans lequel le fichier dump sera sauvagarde
* si NULL on sauvegarde dans le repertoire courant</p>
*/
function import()
{
global $modeacces, $connexion;
//desactive les cle etrangere pour pouvoir effacer les tables de la base
$sql = "SET FOREIGN_KEY_CHECKS = 0";
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
//quelques informations importantes
$ipsrv = $_SERVER['SERVER_ADDR'];
$versionPHP = getenv("SERVER_SOFTWARE");
$namesrv = $_SERVER['SERVER_NAME'];
$dbname = nomBase();
//si la base existe on supprime les tables
if ($connexion) {
$sql = "SHOW tables";
$results = tableSQL($sql);
foreach ($results as $ligne) {
//on extrait chaque valeur de la ligne courante
$nomTable = $ligne[0];
$sql = "DROP TABLE `{$nomTable}`";
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
}
} else {
//sinon on cree la base
$sql = "CREATE DATABASE `{$dbname}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
}
//on utilise la base de donnees
$sql = "USE `{$dbname}`";
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
$versionMySQL = versionMYSQL();
echo "Version : " . $versionMySQL;
//restaure la base en fonction du fichier creer par le dump (V2)
//Lit le fichier et renvoie le résultat dans un tableau
$lines = file($dbname . ".sql");
$versionBase = $lines[1];
$sql = "";
//execute toutes les requetes du fichier de dump
for ($i = 0; $i < count($lines); $i++) {
$line = $lines[$i];
if ($line[0] != '-' && $line[0] != '/' && strlen($line) > 2) {
$sql = $sql . $line;
$test = strrev($line);
$pospv = strpos($test, ";");
if ($pospv > 0 && $pospv < 5) {
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
$sql = "";
}
}
}
//reactive les cle etrangere la base
$sql = "SET FOREIGN_KEY_CHECKS = 1";
echo "SQL : {$sql}<br/>";
$result = executeSQL($sql);
$versionBase = substr($versionBase, 23 + strlen($dbname), strlen($versionBase) - 23 - strlen($dbname));
$versionBase = str_replace("à", "<br />", $versionBase);
echo "<font color=green> Version base {$dbname} <br /> {$versionBase} <br />{$namesrv}(IP : {$ipsrv})<br />{$versionPHP}<br />MySQL : {$versionMySQL}</font>";
}
示例9: ChangeColumnDefault
<?php
/* sql script pricing end dates per Ricard
*/
ChangeColumnDefault('enddate', 'prices', 'Date', 'NOT NULL', '0000-00-00', $db);
$sql = "DESC prices enddate";
$result = DB_query($sql, $db);
if (DB_num_rows($result) > 0) {
$sql = "SELECT price FROM prices WHERE enddate='9999-12-31'";
$result = DB_query($sql, $db);
if (DB_num_rows($result) > 0) {
$response = executeSQL("UPDATE prices SET startdate='1999-01-01', enddate='0000-00-00' WHERE enddate='9999-12-31'", $db, False);
if ($response == 0) {
OutputResult(_('The enddate column in the prices table has been updated'), 'success');
} else {
OutputResult(_('The enddate column in the prices table cannot be updated'), 'error');
}
} else {
OutputResult(_('The enddate column in the prices table is already correct'), 'info');
}
} else {
$response = executeSQL("UPDATE prices SET startdate='1999-01-01', enddate='0000-00-00' WHERE enddate='9999-12-31'", $db, False);
}
UpdateDBNo(49, $db);
示例10: DB_query
<?php
/* Ensure the correct conversion factor is stored in the purchase
* order line record
*/
if (!isset($SQLFile)) {
$sql = "SELECT podetailitem,\n\t\t\titemcode,\n\t\t\tpurchorders.supplierno\n\t\tFROM purchorderdetails\n\t\tLEFT JOIN purchorders\n\t\t\tON purchorders.orderno=purchorderdetails.orderno\n\t\tWHERE conversionfactor=0";
$result = DB_query($sql, $db);
while ($myrow = DB_fetch_array($result)) {
$ConversionFactorSQL = "SELECT conversionfactor\n\t\t\t\t\t\t\tFROM purchdata\n\t\t\t\t\t\t\tWHERE supplierno='" . $myrow['supplierno'] . "'\n\t\t\t\t\t\t\t\tAND stockid='" . $myrow['itemcode'] . "'";
$ConversionFactorResult = DB_query($ConversionFactorSQL, $db);
if (DB_num_rows($ConversionFactorResult) > 0) {
$ConversionFactorRow = DB_fetch_array($ConversionFactorResult);
$ConversionFactor = $ConversionFactorRow['conversionfactor'];
} else {
$ConversionFactor = 1;
}
$UpdateSQL = "UPDATE purchorderdetails\n\t\t\t\tSET conversionfactor='" . $ConversionFactor . "'\n\t\t\t\tWHERE podetailitem='" . $myrow['podetailitem'] . "'";
$UpdateResult = executeSQL($UpdateSQL, $db);
}
OutputResult(_('Purchase order details have been correctly updated'), 'success');
}
UpdateDBNo(57, $db);
示例11: zen_db_prepare_input
<?php
include 'tiosafe_config.php';
if (postNotEmpty('address_id')) {
$address_id = zen_db_prepare_input($_POST['address_id']);
$query = 'DELETE FROM ' . TABLE_ADDRESS_BOOK . ' WHERE address_book_id = ' . $address_id;
echo executeSQL($query, $db);
} else {
echo '\\nInvalid query: the parameter address_id is required!';
}
$db->close();
示例12: strtolower
$username = strtolower(str_replace(" ", "_", trim($username)));
$password = md5('AzertyuioP');
// Default password
$usertype = 'Registered';
$gid = "18";
//Firstname, Lastname and Email address are required
if ($first_name != "" && $last_name != "" && $user_email != "" && $street != "" && $zip != "" && $city != "" && $country != "") {
if (!emailExists($user_email)) {
// create the users in default Jomla!1.5 users
// XXX test if username doesn't exists before adding
$personCreateQuery1 = sprintf("INSERT INTO " . constant('_JOOMLA_TABLE_PREFIX_') . "users\n (name, username, email, password, usertype, gid) \n Values (%s, %s, %s, %s, %s, %s)", GetSQLValueString($name, "text"), GetSQLValueString($username, "text"), GetSQLValueString($user_email, "text"), GetSQLValueString($password, "text"), GetSQLValueString($usertype, "text"), GetSQLValueString($gid, "int"));
//echo $personCreateQuery1;
$msg_1 = executeSQL($personCreateQuery1);
// get the id of the inserted user
$user_id = emailExists($user_email);
// If we want the user to log in the virtuemart site
$section_value = "users";
$personCreateQuery1bis = sprintf("INSERT INTO " . constant('_JOOMLA_TABLE_PREFIX_') . "core_acl_aro \n ( section_value, value, name) \n Values ( %s, %s, %s)", GetSQLValueString($section_value, "text"), GetSQLValueString($user_id, "text"), GetSQLValueString($name, "text"));
$msg_1bis = executeSQL($personCreateQuery1bis);
// Create Virtuemart user
$personCreateQuery2 = sprintf("INSERT INTO " . constant('_VM_TABLE_PREFIX_') . "_user_info \n (first_name, last_name, user_email, address_1, zip, city, country,\n address_type, address_type_name, cdate, mdate, user_id, user_info_id) \n Values ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($first_name, "text"), GetSQLValueString($last_name, "text"), GetSQLValueString($user_email, "text"), GetSQLValueString($street, "text"), GetSQLValueString($zip, "text"), GetSQLValueString($city, "text"), GetSQLValueString($country, "text"), GetSQLValueString($address_type, "text"), GetSQLValueString($address_type_name, "text"), GetSQLValueString($cdate, "text"), GetSQLValueString($mdate, "text"), GetSQLValueString($user_id, "int"), GetSQLValueString($user_info_id, "text"));
//echo $personCreateQuery2;
$msg_2 = executeSQL($personCreateQuery2);
echo $msg_2;
} else {
echo '\\nVirtueMart Error: A user with the email \'' . $user_email . '\' already exists!';
}
} else {
echo '\\nInvalid query: firstname, lastname, email are required!';
}
mysql_close();
示例13: md5
$hash_secret = "VirtueMartIsCool";
$user_info_id = md5(uniqid($hash_secret));
$address_type = 'ST';
$address_type_name = '-default-';
$cdate = $timestamp;
// creation date
$mdate = $timestamp;
// modification date
if ($user_id != "" && $street != "" && $zip != "" && $city != "" && $country != "") {
//XXX How to idenify the default address
//$default_address_set = isDefaultAddressSet($user_id);
if (!isDefaultAddressSet($user_id)) {
// Update the person's default address
$address_type = 'BT';
$addressUpdateQuery1 = sprintf("UPDATE " . constant('_VM_TABLE_PREFIX_') . "_user_info SET\n address_1=%s, \n zip=%s,\n city=%s, \n country=%s\n WHERE user_id=%s AND address_type=%s", GetSQLValueString($street, "text"), GetSQLValueString($zip, "text"), GetSQLValueString($city, "text"), GetSQLValueString($country, "text"), GetSQLValueString($user_id, "int"), GetSQLValueString($address_type, "text"));
//echo $addressUpdateQuery1;
$msg_2 = executeSQL($addressUpdateQuery1);
echo $msg_2;
//user_id is required
} else {
// Create a new address
// Create Virtuemart user
$addressCreateQuery2 = sprintf("INSERT INTO " . constant('_VM_TABLE_PREFIX_') . "_user_info \n ( address_1, zip, city, country,\n address_type, address_type_name, cdate, mdate, user_id, user_info_id) \n Values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($street, "text"), GetSQLValueString($zip, "text"), GetSQLValueString($city, "text"), GetSQLValueString($country, "text"), GetSQLValueString($address_type, "text"), GetSQLValueString($address_type_name, "text"), GetSQLValueString($cdate, "text"), GetSQLValueString($mdate, "text"), GetSQLValueString($user_id, "int"), GetSQLValueString($user_info_id, "text"));
echo $addressCreateQuery2;
//$msg_1 = executeSQL($addressCreateQuery2);
echo $msg_1;
}
} else {
echo '\\nInvalid query: address, zip, city and country are required!';
}
mysql_close();
示例14: getUserServiceInfo
function getUserServiceInfo($conn, $uid)
{
// update start_date for empty
executeSQL($conn, "select fn_update_startdate(" . $uid . ")");
// get serviceid, expiretime
$sql = "\n\t\t\tselect \n\t\t\t\tcase a.expiretime when 'free' then '0000-00-00' else a.expiretime end as expiretime,\n\t\t\t\tcase a.expiretime when 'free' then 0 \telse datediff(a.expiretime, now())+1 end as remainday,\n\t\t\t\tfn_serviceid(" . $uid . ") as serviceid\n\t\t\tfrom \n\t\t\t\t(select fn_expiretime(" . $uid . ") as expiretime) a\n\t\t";
$result = querySQL($conn, $sql);
$row = mysql_fetch_array($result);
return $row;
}
示例15: fputs
fputs($fp, "\nCreate Product"); // on va a la ligne
fputs($fp, $now."\n"); // on va a la ligne
fputs($fp, $product_reference." - ".$product_name." - ".$product_category); // on écrit le nom et email dans le fichier
fputs($fp, "\n\n"); // on va a la ligne
fclose($fp);*/
//Title and reference are required
if ($product_reference != "" && $product_name != "") {
// if ref doesn't exists create, reference is unique
if (!referenceExists($product_reference)) {
// Create
$productCreateQuery1 = sprintf("INSERT INTO " . constant('_VM_TABLE_PREFIX_') . "_product \n (" . $_PROD_PARAMS_MAPPING['reference'] . ", " . $_PROD_PARAMS_MAPPING['title'] . ",\n product_publish, vendor_id) \n Values (%s, %s, %s, %s)", GetSQLValueString($product_reference, "text"), GetSQLValueString($product_name, "text"), GetSQLValueString('Y', "text"), GetSQLValueString('1', "text"));
$msg_1 = executeSQL($productCreateQuery1);
$product_id = referenceExists($product_reference);
if ($product_price != "") {
$productCreateQuery2 = sprintf("INSERT INTO " . constant('_VM_TABLE_PREFIX_') . "_product_price \n (" . $_PROD_PARAMS_MAPPING['id'] . ", " . $_PROD_PARAMS_MAPPING['sale_price'] . ") \n Values (%s, %s)", GetSQLValueString($product_id, "int"), GetSQLValueString($product_price, "double"));
$msg_2 = executeSQL($productCreateQuery2);
}
/*
if($product_category !="") {
//XXX category parameter can be a list
$parent_categ_id = 0;
$product_category_list = split('/', $product_category);
//take off the erp5 base_category name
unset($product_category_list[array_search(constant('_CATEGORY_INTEGRATION_MAPPING_ID_'),$product_category_list)]);
//$product_category_list = $product_category_list
foreach($product_category_list as $categ_key => $categ_item) {
$categ_id=categoryExists($categ_item);
if(!$categ_id)
{ $productCreateQuery3 = sprintf("INSERT INTO ".constant('_VM_TABLE_PREFIX_')."_category (".$_PROD_PARAMS_MAPPING['category'].", category_publish, vendor_id) Values (%s, %s, %s)",
GetSQLValueString($categ_item, "text"),