当前位置: 首页>>代码示例>>PHP>>正文


PHP MySQL::Row方法代码示例

本文整理汇总了PHP中MySQL::Row方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::Row方法的具体用法?PHP MySQL::Row怎么用?PHP MySQL::Row使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MySQL的用法示例。


在下文中一共展示了MySQL::Row方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_users

 /**
  * returns array of all users
  * [userID] => 23103741
  * [name] => admin
  * [mail] => 0
  * [active] => 0
  *
  * @param int $trash
  * @param array $groups list of group ids the users must be a member of
  * @return array
  * @author th
  */
 public function get_users($trash = 0, array $groups = null)
 {
     $p = $this->kga['server_prefix'];
     $trash = MySQL::SQLValue($trash, MySQL::SQLVALUE_NUMBER);
     if (empty($groups)) {
         $query = "SELECT * FROM {$p}users\n                WHERE trash = {$trash}\n                ORDER BY name ;";
     } else {
         $query = "SELECT DISTINCT u.* FROM {$p}users AS u\n                JOIN {$p}groups_users AS g_u USING(userID)\n                WHERE g_u.groupID IN (" . implode($groups, ',') . ") AND\n                trash = {$trash}\n                ORDER BY name ;";
     }
     $this->conn->Query($query);
     $rows = $this->conn->RowArray(0, MYSQLI_ASSOC);
     $i = 0;
     $arr = array();
     $this->conn->MoveFirst();
     while (!$this->conn->EndOfSeek()) {
         $row = $this->conn->Row();
         $arr[$i]['userID'] = $row->userID;
         $arr[$i]['name'] = $row->name;
         $arr[$i]['globalRoleID'] = $row->globalRoleID;
         $arr[$i]['mail'] = $row->mail;
         $arr[$i]['active'] = $row->active;
         $arr[$i]['trash'] = $row->trash;
         if ($row->password != '' && $row->password != '0') {
             $arr[$i]['passwordSet'] = "yes";
         } else {
             $arr[$i]['passwordSet'] = "no";
         }
         $i++;
     }
     return $arr;
 }
开发者ID:kimai,项目名称:kimai,代码行数:43,代码来源:Mysql.php

示例2: get_uri_data

        return FALSE;
    }
}
function get_uri_data($args)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    if (!is_array($args)) {
        parse_str($args, $args);
    }
    if (isset($args['uri'])) {
        $uri = $args['uri'];
    } else {
        $uri = FALSE;
    }
    if (isset($args['id'])) {
        $id_uri = $args['id'];
    } else {
        $id_uri = FALSE;
    }
    $tableName = DB_PREFIX . "request_uri";
    if (is_numeric($id_uri)) {
        $whereArray = array('id' => MySQL::SQLValue($id_uri));
    } else {
        $whereArray = array('uri' => MySQL::SQLValue($uri));
    }
    $hmdb->SelectRows($tableName, $whereArray);
    if ($hmdb->HasRecords()) {
        $row = $hmdb->Row();
        return $row;
    } else {
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:30,代码来源:routing.php

示例3: admin_cp_login

/** Đăng nhập admin cp */
function admin_cp_login()
{
    global $hmuser;
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    hook_action('admin_cp_login');
    $user_login = hm_post('login');
    $password = hm_post('password');
    $logmein = hm_post('log-me-in');
    if (is_numeric($logmein)) {
        $tableName = DB_PREFIX . "users";
        $whereArray = array('user_login' => MySQL::SQLValue($user_login));
        $hmdb->SelectRows($tableName, $whereArray);
        if ($hmdb->HasRecords()) {
            $row = $hmdb->Row();
            $salt = $row->salt;
            $user_pass = $row->user_pass;
            $password_encode = hm_encode_str(md5($password . $salt));
            if ($password_encode == $user_pass) {
                $time = time();
                $ip = hm_ip();
                $cookie_array = array('time' => $time, 'ip' => $ip, 'user_login' => $user_login, 'admincp' => 'yes');
                $cookie_user = hm_encode_str($cookie_array);
                setcookie('admin_login', $cookie_user, time() + COOKIE_EXPIRES, '/');
                $_SESSION['admin_login'] = $cookie_user;
                return json_encode(array('status' => 'success', 'mes' => _('Đăng nhập thành công')));
            } else {
                return json_encode(array('status' => 'error', 'mes' => _('Sai mật khẩu')));
            }
        } else {
            return json_encode(array('status' => 'error', 'mes' => _('Không có tài khoản này')));
        }
    }
}
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:34,代码来源:login_model.php

示例4: get_media_group_part

/** Lấy đường dẫn nhóm media */
function get_media_group_part($id = 0, $i = 1, $deepest = FALSE)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    if (!is_numeric($id)) {
        $tableName = DB_PREFIX . 'media_groups';
        $whereArray = array('folder' => MySQL::SQLValue($id));
        $hmdb->SelectRows($tableName, $whereArray);
        $row = $hmdb->Row();
        $id = $row->id;
    }
    $bre = array();
    $sub_bre = FALSE;
    if ($deepest == FALSE) {
        $deepest = $id;
    }
    $tableName = DB_PREFIX . 'media_groups';
    $whereArray = array('id' => MySQL::SQLValue($id));
    $hmdb->SelectRows($tableName, $whereArray);
    $row = $hmdb->Row();
    $num_rows = $hmdb->RowCount();
    if ($num_rows != 0) {
        $this_id = $row->id;
        $folder = $row->folder;
        $parent = $row->parent;
        $bre['level_' . $i] = $folder;
        if ($parent != '0') {
            $inew = $i + 1;
            $sub_bre = get_media_group_part($parent, $inew, $deepest);
        }
    }
    if (is_array($sub_bre)) {
        $bre = array_merge($bre, $sub_bre);
    }
    krsort($bre);
    $part = implode("/", $bre);
    if ($deepest == $id) {
        return $part;
    } else {
        return $bre;
    }
}
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:42,代码来源:media.php

示例5: dupeCheck

 public function dupeCheck($name)
 {
     $db = new MySQL(true, 'color64', 'localhost', 'color64', 'nu5Jc4JdtZK4RCHH');
     $q = $db->Query("SELECT `id` FROM `users`");
     $allrecords = $db->RowCount();
     $q = $db->Query("SELECT `id` FROM `users` WHERE `name` LIKE '" . $name . "';");
     if ($db->RowCount() > 0) {
         $dupes = $db->Row()->id;
     } else {
         $dupes = 0;
     }
     return array('total' => $allrecords, 'dupe' => $dupes);
 }
开发者ID:vlhorton,项目名称:color64,代码行数:13,代码来源:members.php

示例6: chapter_show_data

function chapter_show_data($id)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    hook_action('chapter_show_data');
    if (!$hmdb->Query("SELECT * FROM " . DB_PREFIX . "content WHERE `status` = 'chapter' AND `parent` = '{$id}' ORDER BY id DESC")) {
        $hmdb->Kill();
    }
    $array_cha = array();
    while ($row = $hmdb->Row()) {
        $data_cha = content_data_by_id($row->id);
        $array_cha[] = array('id' => $row->id, 'name' => $row->name, 'slug' => $row->slug, 'public_time' => date('d-m-Y H:i', $data_cha['field']['public_time']));
    }
    $array['chapter'] = $array_cha;
    return hook_filter('chapter_show_data', json_encode($array, TRUE));
}
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:15,代码来源:chapter_model.php

示例7: list_plugin

function list_plugin($active = 1)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    $tableName = DB_PREFIX . "plugin";
    $whereArray = array('active' => MySQL::SQLValue($active, MySQL::SQLVALUE_NUMBER));
    $hmdb->SelectRows($tableName, $whereArray);
    if ($hmdb->HasRecords()) {
        while ($row = $hmdb->Row()) {
            $return[] = $row->key;
        }
        return json_encode($return);
    } else {
        return array();
    }
}
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:15,代码来源:plugin_model.php

示例8: request_suggest

function request_suggest($key)
{
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    global $hmtaxonomy;
    global $hmcontent;
    $return = '';
    $input_name = hm_post('input', '');
    $key = trim($key);
    $key = str_replace(' ', '-', $key);
    if ($key != '') {
        $tableName = DB_PREFIX . 'request_uri';
        $hmdb->Query("SELECT * FROM `" . $tableName . "` WHERE `uri` LIKE '%" . $key . "%' LIMIT 10");
        while ($row = $hmdb->Row()) {
            $id = $row->id;
            $object_id = $row->object_id;
            $object_type = $row->object_type;
            $uri = $row->uri;
            $suggest_label = '';
            $object_name = '';
            switch ($object_type) {
                case 'taxonomy':
                    $tax_data = taxonomy_data_by_id($object_id);
                    $tax_key = $tax_data['taxonomy']->key;
                    $taxonomy = $hmtaxonomy->hmtaxonomy;
                    $suggest_label = $taxonomy[$tax_key]['taxonomy_name'];
                    $object_name = get_tax_val('name=name&id=' . $object_id);
                    break;
                case 'content':
                    $con_data = content_data_by_id($object_id);
                    $con_key = $con_data['content']->key;
                    $content = $hmcontent->hmcontent;
                    $suggest_label = $content[$con_key]['content_name'];
                    $object_name = get_con_val('name=name&id=' . $object_id);
                    break;
            }
            $return .= '<li>';
            $return .= '<p data-id="' . $id . '" data-input="' . $input_name . '" data-name="' . $object_name . '" object_id="' . $object_id . '" object_type="' . $object_type . '">';
            $return .= '<span class="suggest_label">' . $suggest_label . ': </span><b>' . $object_name . '</b>';
            $return .= '</p>';
            $return .= '</li>';
        }
    }
    return $return;
}
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:44,代码来源:request_model.php

示例9: while

 while (!$db->EndOfSeek()) {
     $row = $db->Row();
     $dbd->Query($row->req);
 }
 $db->Query("update temprequet set stat=1 where stat=0");
 // ---------------------------------------------------
 // Execute Remote requete on locoal server
 // ---------------------------------------------------
 global $db;
 $fullquery = "SELECT req,id from temprequet where stat=0 ";
 if (!$dbd->Query($fullquery)) {
     $dbd->Kill($dbd->Error());
 }
 $nbrremotreq = $dbd->RowCount();
 while (!$dbd->EndOfSeek()) {
     $row = $dbd->Row();
     if (!$db->Query($row->req)) {
         $db->Kill($db->Error());
     } else {
         $dbd->Query("update temprequet set stat=1 where id=" . $row->id);
     }
 }
 // ---------------------------------------------------
 // Insert log Last update
 // ---------------------------------------------------
 $nbrreq = $nbrlocalreq + $nbrremotreq;
 $lastmaj = "Insert into maj_sys(nbrreq,user)values({$nbrreq}," . $_SESSION['userid'] . ")";
 if (!$db->Query($lastmaj)) {
     $db->Kill($lastmaj);
 }
 exit("ok");
开发者ID:ATS001,项目名称:MRN,代码行数:31,代码来源:sync_c.php

示例10: MySQL

<?php

header("Content-type: text/xml");
$hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
$sitemap = '';
$sitemap .= '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n";
$sitemap .= '<?xml-stylesheet type="text/xsl" href="' . PLUGIN_URI . 'hm_seo/asset/sitemap.xsl"?>' . "\r\n";
$sitemap .= '<!-- generator="hoamaicms/1.0" -->' . "\r\n";
$sitemap .= '<!-- sitemap-generator-url="hoamaisoft.com" sitemap-generator-version="1.0" -->' . "\r\n";
$sitemap .= '<!-- generated-on="26.09.2015 12:11" -->' . "\r\n";
$sitemap .= '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\r\n";
//loop
$tableName = DB_PREFIX . "request_uri";
$hmdb->SelectRows($tableName, NULL, NULL, 'object_type', FALSE);
while ($row = $hmdb->Row()) {
    $object_id = $row->object_id;
    $object_type = $row->object_type;
    $uri = $row->uri;
    $uri = urlencode($uri);
    switch ($object_type) {
        case 'content':
            $include_to_sitemap = get_con_val("name=include_to_sitemap&id={$object_id}");
            $sitemap_change_frequency = get_con_val("name=sitemap_change_frequency&id={$object_id}");
            $sitemap_priority = get_con_val("name=sitemap_priority&id={$object_id}");
            $time = get_con_val("name=public_time&id={$object_id}");
            $lastmod = '<lastmod>' . date('Y-m-d H:i:s', $time) . '</lastmod>';
            if ($sitemap_change_frequency == 'auto') {
                $sitemap_change_frequency = get_option(array('section' => 'hm_seo', 'key' => 'content_sitemap_change_frequency', 'default_value' => 'daily'));
            }
            if ($sitemap_priority == 'auto') {
                $sitemap_priority = get_option(array('section' => 'hm_seo', 'key' => 'content_sitemap_priority', 'default_value' => '0.6'));
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:31,代码来源:sitemap.php

示例11: backupDatabase

 function backupDatabase($dbName, $backupStructure = true, $backupData = true, $backupFile = null)
 {
     $columnName = 'Tables_in_' . $dbName;
     $this->done = false;
     $this->output .= "-- SQL Dump File \n";
     $this->output .= "-- Generation Time: " . date('M j, Y') . " at " . date('h:i:s A') . " \n\n";
     $this->output .= "-- \n";
     $this->output .= "-- Database: `{$dbName}` \n";
     $this->output .= "-- \n\n";
     $conn = new MySQL(true, DBNAME, DBHOST, DBUSER, DBPASS, "", true);
     $strTables = 'SHOW TABLES';
     $conn->Query($strTables);
     $cntTables = $conn->RowCount();
     if ($cntTables) {
         $conn->MoveFirst();
         while (!$conn->EndOfSeek()) {
             $rsTables = $conn->Row();
             if ($backupStructure) {
                 $this->dumpTableStructure($rsTables->{$columnName});
             }
             if ($backupData) {
                 $this->dumpTableData($rsTables->{$columnName});
             }
         }
     } else {
         $this->output .= "-- \n";
         $this->output .= "-- No tables in {$dbName} \n";
         $this->output .= "-- \n";
     }
     if (!is_null($backupFile)) {
         $this->dumpToFile($backupFile);
     }
     $this->done = true;
 }
开发者ID:aliihaidar,项目名称:pso,代码行数:34,代码来源:backup.class.php

示例12:

// while showing the last MySQL error.
if ($db->Error()) {
    $db->Kill();
}
// Or use: if ($db->Error()) die($db->Error());
// Or: if ($db->Error()) echo $db->Error();
// Execute our query
if (!$db->Query("SELECT * FROM Test")) {
    $db->Kill();
}
// Let's show how many records were returned
echo $db->RowCount() . " records returned.<br />\n<hr />\n";
// Loop through the records using the MySQL object (prefered)
$db->MoveFirst();
while (!$db->EndOfSeek()) {
    $row = $db->Row();
    echo "Row " . $db->SeekPosition() . ": ";
    echo $row->Color . " and " . $row->Age . "<br />\n";
}
// =========================================================================
// The rest of this tutorial covers addition methods of getting to the data
// and is completely optional.
// =========================================================================
echo "<hr />\n";
// ---------------------------------------------------------
// Loop through the records using a counter and display the values
for ($index = 0; $index < $db->RowCount(); $index++) {
    $row = $db->Row($index);
    echo "Index " . $index . ": ";
    echo $row->Color . " and " . $row->Age . "<br />\n";
}
开发者ID:kimai,项目名称:kimai,代码行数:31,代码来源:example.select.php

示例13: menu_select_choise

    $array = array('id' => $id, 'status' => TRUE);
    return json_encode($array);
}
function menu_select_choise($args = array())
{
    if (!is_array($args)) {
        parse_str($args, $args);
    }
    hook_action('menu_select_choise');
    if (isset($args['checked'])) {
        $checked = $args['checked'];
    } else {
        $checked = 0;
    }
    if (isset($args['name'])) {
        $name = $args['name'];
    } else {
        $name = 'menu';
    }
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    $tableName = DB_PREFIX . "object";
    $whereArray = array('key' => MySQL::SQLValue('menu'));
    $hmdb->SelectRows($tableName, $whereArray);
    $rowCount = $hmdb->RowCount();
    if (is_numeric($rowCount)) {
        $options[] = array('value' => '0', 'label' => 'Chọn một trình đơn');
        while ($row = $hmdb->Row()) {
            $options[] = array('value' => $row->id, 'label' => $row->name);
        }
        $field_array['input_type'] = 'select';
        $field_array['name'] = $name;
        $field_array['input_option'] = $options;
        $field_array['default_value'] = $checked;
        $field_array['addClass'] = 'choise_menu';
开发者ID:butkimtinh,项目名称:hoamai-cms-beta-1.0,代码行数:34,代码来源:menu_model.php

示例14: query_content


//.........这里部分代码省略.........
                $query_join .= " AND `object_id` IN (" . $query_content_key . ") ";
            }
            if ($query_in_taxonomy) {
                $query_join .= " OR `object_id` IN (" . $query_in_taxonomy . ") ";
            }
            $query_join .= " OR `object_id` IN (" . $query_field . ") ";
            break;
        case 'and':
            if ($query_content_key) {
                $query_join .= " AND `object_id` IN (" . $query_content_key . ") ";
            }
            if ($query_in_taxonomy) {
                $query_join .= " AND `object_id` IN (" . $query_in_taxonomy . ") ";
            }
            $query_join .= " AND `object_id` IN (" . $query_field . ") ";
            break;
        default:
            if ($query_content_key) {
                $query_join .= " AND `object_id` IN (" . $query_content_key . ") ";
            }
            if ($query_in_taxonomy) {
                $query_join .= " AND `object_id` IN (" . $query_in_taxonomy . ") ";
            }
            $query_join .= " AND `object_id` IN (" . $query_field . ") ";
    }
    /** Kết thúc các query lấy các content id thỏa mãn yêu cầu */
    /** Order theo 1 field  và limit */
    if (isset($args['order'])) {
        $order_by = $args['order'];
    } else {
        $order_by = 'public_time,desc,number';
    }
    if (isset($args['limit'])) {
        $limit = $args['limit'];
    } else {
        $limit = get_option(array('section' => 'system_setting', 'key' => 'post_per_page', 'default_value' => '12'));
    }
    if (isset($args['offset']) and is_numeric($args['offset'])) {
        $offset = $args['offset'];
    } else {
        $offset = 0;
    }
    if (isset($args['paged'])) {
        $paged = $args['paged'];
    } else {
        $paged = get_current_pagination();
    }
    $paged = $paged - 1;
    if ($paged < 0) {
        $paged = 0;
    }
    /** Tạo query ORDER */
    $ex = explode(',', $order_by);
    $ex = array_map("trim", $ex);
    $order_field = $ex[0];
    $order = strtoupper($ex[1]);
    if (isset($ex[2])) {
        $numerically = $ex[2];
    } else {
        $numerically = FALSE;
    }
    if ($numerically == 'number') {
        $order_query = " AND `name` = '" . $order_field . "' ORDER BY CAST(val AS unsigned) " . $order . " ";
    } else {
        $order_query = " AND `name` = '" . $order_field . "' ORDER BY `val` " . $order . " ";
    }
    /** Tạo query LIMIT */
    if (is_numeric($limit)) {
        $limit_query = " LIMIT {$limit} ";
    } else {
        $limit_query = '';
    }
    /** Tạo query OFFSET */
    if ($limit == FALSE) {
        $offset_query = '';
    } else {
        $offset_query_page = $paged * $limit;
        $offset_query_page = $offset_query_page + $offset;
        $offset_query = " OFFSET {$offset_query_page} ";
    }
    /** Tạo câu lệnh select từ chuỗi các id thỏa mãn */
    $result = array();
    $sql = "SELECT `object_id`" . " FROM `" . DB_PREFIX . "field`" . " WHERE `object_type` = 'content'" . " " . $query_join . " " . " " . $order_query . " ";
    $hmdb->Query($sql);
    $total_result = $hmdb->RowCount();
    $sql = "SELECT `object_id`" . " FROM `" . DB_PREFIX . "field`" . " WHERE `object_type` = 'content'" . " " . $query_join . " " . " " . $order_query . " " . $limit_query . " " . $offset_query . " ";
    $hmdb->Query($sql);
    $base = get_current_uri();
    if ($base == '') {
        $base = '/';
    }
    $hmcontent->set_val(array('key' => 'total_result', 'val' => $total_result));
    $hmcontent->set_val(array('key' => 'paged', 'val' => $paged + 1));
    $hmcontent->set_val(array('key' => 'perpage', 'val' => $limit));
    $hmcontent->set_val(array('key' => 'base', 'val' => $base));
    while ($row = $hmdb->Row()) {
        $result[] = $row->object_id;
    }
    return $result;
}
开发者ID:hoamaisoft,项目名称:hoamai-cms-beta-1.0,代码行数:101,代码来源:content.php

示例15: getIndirizzi

 /**
  * Metodo per a creazione del file di indirizzi (indirizzi fatturazione - spedizione)
  */
 function getIndirizzi()
 {
     /*
      * La richiesta � quella di gestire anche un 4� file, denominato FWINDIRIZZI, che contenga tutti gli indirizzi di spedizione.
      * 
      * 
      */
     $query = "SELECT \n\t\tid_address,\n\t    customer_code,\n\t\tcompany,\n\t\tfirstname,\n\t\tlastname,\n\t\tCONCAT(address1, ' ', address2) as full_address,\n\t\tpostcode,\n\t\tcity,\n\t\tstate_name,\n\t\tphone,\n\t\tphone_mobile,\n\t\tvat_number\n\t\t\n\t\tFROM ps_address \n\t\tLEFT JOIN (SELECT code as customer_code, id_customer from ps_customer) AS ps_customer_joined  ON ps_customer_joined.id_customer = ps_address.id_customer\n\t\tLEFT JOIN (SELECT name as state_name, id_state from ps_state) as ps_state_joined ON ps_state_joined.id_state = ps_address.id_state\n\t\t\n\t\tWHERE ((synch = 0)AND(NOT(alias LIKE 'fatturazione')))";
     $db = new MySQL();
     $db->Query($query);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $row[] = $db->Row();
         }
     }
     foreach ($row as $anag) {
         /* DOC: 2.1) TABELLA FWINDIRIZZI (1)
         		  		La tabella FWINDIRIZZI potr� avere un tracciato record ricavato da quello della tabella �ps_address� di Presta Shop:
         		  		Campo	Valori	Chiave	Descrizione campo
         		  		ID_Address	int	si	Numero univoco indirizzo
         		  		CdCustomer	char(50)	no	Codice del cliente, ricavato dalla tabella ps_customer
         		  		Company	char(64)	no	Ragione sociale
         		  		Cognome	char(32)	no	Cognome, da concatenare con Nome e importare in DestDiv.Des2Dest
         		  		Nome	char(32)	no	Vedi sopra
         		  		Address	char(128)	no	Indirizzo
         		  		Zip	char(12)	no	Codice Avviamento Postale
         		  		City	char(64)	no	Localit�
         NB. -> ripetizione. elimino =>		City	char(64)	no	Localit�
         		  		Prov	char(5)	no	Sigla Provincia, ricavato da ID_State o ID_Country ?
         		  		Phone	char(32)	no	Telefono
         		  		PhoneMob	char(32)	no	Cellulare, da importare in Contatto
         		  		VATnum	char(32)	no	Partita IVA
           		*/
         $stringa = null;
         $stringa[] = $anag->id_address;
         $stringa[] = $anag->customer_code;
         $stringa[] = !empty($anag->company) ? $anag->company : "-Senza Ragione Sociale-";
         $stringa[] = !empty($anag->lastname) ? $anag->lastname : "-Senza Cognome-";
         $stringa[] = !empty($anag->firstname) ? $anag->firstname : "-Senza Nome-";
         $stringa[] = !empty($anag->full_address) ? $anag->full_address : "-Senza Indirizzo-";
         $stringa[] = $anag->postcode;
         $stringa[] = $anag->city;
         $stringa[] = $anag->state_name;
         $stringa[] = $anag->phone;
         $stringa[] = $anag->phone_mobile;
         $stringa[] = !empty($anag->vat_number) ? $anag->vat_number : "-Senza Partita Iva-";
         file_put_contents($this->fileFWINDIRIZZI, iconv(mb_detect_encoding(implode("§", $stringa), mb_detect_order(), true), "UTF-8", implode("§", $stringa)) . "\r\n", FILE_APPEND);
         $this->setAnagraficaSynchronized($anag->id_address);
         /*
           		$stringa = null;
           		$stringa[] = $this->fillCodeClientiWithZero($this -> getCodeClienti(), $anag -> id_customer);
           		// CDute [0]
           		$appo = null;
           		$appo = $this -> getSIngleAnagFromId($anag -> id_customer);
           		if (!empty($appo -> company)) {
           			$stringa[] = $appo -> company;
           			// DSRaso [1]
           		} else {
           			$stringa[] = "-Senza Ragione Sociale-";
           	
           		}
           		if (!empty($anag -> lastname)) {
           			$stringa[] = $anag -> lastname;
           			// DSCognome [2]
           		} else {
           			$stringa[] = "-Senza Cognome-";
           		}
           		if (!empty($anag -> firstname)) {
           			$stringa[] = $anag -> firstname;
           			// DSnome [3]
           		} else {
           			$stringa[] = "-Senza Nome-";
           		}
           		if (!empty($appo -> vat_number)) {
           			$stringa[] = $appo -> vat_number;
           			// DSpiva [4]
           		} else {
           			$stringa[] = "-Senza Partita Iva-";
           		}
           		if (!empty($appo -> dni)) {
           			$stringa[] = $appo -> dni;
           			// DScod_fis [5]
           		} else {
           			$stringa[] = "-Senza Codice Fiscale-";
           		}
           	
           		$stringa[] = $appo -> address1;
           		// DSindi [6]
           		$stringa[] = $appo -> postcode;
           		// DScap [7]
           		$stringa[] = $appo -> city;
           		// DSloca [8]
           		$stringa[] = $this -> getStateFromId($appo -> id_state);
           		//$stringa[] = "";                                                              // DSprov [9]
           		$stringa[] = $appo -> phone;
           		// DStel [10]
//.........这里部分代码省略.........
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:101,代码来源:ps2erp.php


注:本文中的MySQL::Row方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。