如何将其转换为ASP.NET C#? [英] How to convert this into ASP.NET C# ?
问题描述
插入。 DB_PREFIX。 customer SET store_id ='。 (int)$ this-> config-> get('config_store_id')。 ',firstname ='。 $ this-> db-> escape($ data ['firstname'])。 ',lastname ='。 $ this-> db-> escape($ data ['lastname'])。 ',email ='。 $ this-> db-> escape($ data ['email'])。 ',电话='。 $ this-> db-> escape($ data ['telephone'])。 ',fax ='。 $ this-> db-> escape($ data ['fax'])。 ',盐='。 $ this-> db-> escape($ salt = substr(md5(uniqid(rand(),true)),0,9))。 ',密码='。 $ this-> db-> escape(sha1($ salt.sha1($ salt.sha1($ data ['password']))))。 ',newsletter ='。 (isset($ data ['newsletter'])?(int)$ data ['newsletter']:0)。 ',customer_group_id ='。 (int)$ customer_group_id。 ',ip ='。 $ this-> db-> escape($ this-> request-> server ['REMOTE_ADDR'])。 ',status ='1',approved ='。 (int)!$ customer_group_info ['approval']。 ',date_added = NOW()
我尝试过:
我尝试过使用sha1但没有工作。
string hashedPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(saltAndPwd,sha1);
"INSERT INTO " . DB_PREFIX . "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', salt = '" . $this->db->escape($salt = substr(md5(uniqid(rand(), true)), 0, 9)) . "', password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($data['password'])))) . "', newsletter = '" . (isset($data['newsletter']) ? (int)$data['newsletter'] : 0) . "', customer_group_id = '" . (int)$customer_group_id . "', ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "', status = '1', approved = '" . (int)!$customer_group_info['approval'] . "', date_added = NOW()"
What I have tried:
I have tried using sha1 but not working .
string hashedPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(saltAndPwd, "sha1");
推荐答案
this-> config-> get(' config_store_id')。 ',firstname ='。
this->config->get('config_store_id') . "', firstname = '" .
this-> db-> escape(
this->db->escape(
data ['firstname'])。 ',lastname ='。
data['firstname']) . "', lastname = '" .
这篇关于如何将其转换为ASP.NET C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!