ArticleData::copy PHP Method

copy() public method

Copy the row in the database.
public copy ( integer $p_destArticleNumber ) : void
$p_destArticleNumber integer
return void
    public function copy($p_destArticleNumber)
    {
        global $g_ado_db;
        $tmpData = $this->m_data;
        unset($tmpData['NrArticle']);
        foreach ($tmpData as $key => $data) {
            $tmpData[$key] = "'" . $data . "'";
        }
        $queryStr = 'INSERT IGNORE INTO ' . $this->m_dbTableName . '(NrArticle,' . implode(',', array_keys($this->m_columnNames)) . ')' . ' VALUES (' . $p_destArticleNumber . ',' . implode(',', $tmpData) . ')';
        $g_ado_db->Execute($queryStr);
    }