當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Conectar::Insertar_marca方法代碼示例

本文整理匯總了PHP中Conectar::Insertar_marca方法的典型用法代碼示例。如果您正苦於以下問題:PHP Conectar::Insertar_marca方法的具體用法?PHP Conectar::Insertar_marca怎麽用?PHP Conectar::Insertar_marca使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Conectar的用法示例。


在下文中一共展示了Conectar::Insertar_marca方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trim

 $codigo = trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue());
 $descrip = utf8_encode(trim($objWorksheet->getCellByColumnAndRow(1, $i)->getValue()));
 $marca = utf8_encode(trim($objWorksheet->getCellByColumnAndRow(2, $i)->getValue()));
 $refer = utf8_encode(trim($objWorksheet->getCellByColumnAndRow(3, $i)->getValue()));
 $precio = $objWorksheet->getCellByColumnAndRow(4, $i)->getValue();
 $respon1 = $conecta->Insertar_descripcion($descrip);
 if (isset($respon1['last_cod_id'])) {
     $codi_desc = $respon1['last_cod_id'];
 } else {
     $select_desc = 'SELECT Descri_id FROM produc_descripcion_ WHERE Descri_nomb = "' . $descrip . '"';
     $busc1 = $conecta->consultas($select_desc);
     $codi_desc = $busc1["Descri_id"];
     //var_dump($codi_desc);
     //echo "  descuen ".$codi_desc." ";
 }
 $respon2 = $conecta->Insertar_marca($marca);
 if (isset($respon2['last_cod_id'])) {
     $codi_marc = $respon2['last_cod_id'];
 } else {
     $select_marc = 'SELECT Marca_id FROM produc_marca WHERE Marca_nomb = "' . $marca . '"';
     $busc2 = $conecta->consultas($select_marc);
     $codi_marc = $busc2["Marca_id"];
     //var_dump($codi_marc);
     //echo "  marca ".$codi_desc." ";
 }
 $respon3 = $conecta->Insertar_referencia($refer);
 if (isset($respon3['last_cod_id'])) {
     $codi_refe = $respon3['last_cod_id'];
 } else {
     $select_refe = 'SELECT Referen_id FROM produc_referencia WHERE Referenc_nomb = "' . $refer . '"';
     $busc3 = $conecta->consultas($select_refe);
開發者ID:andres18281,項目名稱:kit_motos,代碼行數:31,代碼來源:excel.php


注:本文中的Conectar::Insertar_marca方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。