我正在寻找一些帮助,我正在尝试找出一种从两个值中获取数据的方法,并显示另一个盒子中的差异.
例
A B
1 The cat and dog |
2 The and dog | cat
3 cat and dog | the
4 the cat | and dog
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我正在为工作做一个基本的添加用户表单,我正在尝试将用户添加到数据库但是当我尝试时,我只是得到主键是重复错误.很确定解决方案是正确的看着我,但我今天碰壁了大声笑.
数据库表struture
dbo.ci_users
id(PK, int, not null)
user_name(nchar255, not null)
user_email(nchar255, not null)
user_password(nchar255, not null)
user_displayname(nchar255, not null)
user_active(smallint, not null)
user_level(smallint, not null)
Run Code Online (Sandbox Code Playgroud)
Adduser_model
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class adduser_database extends CI_Model {
function __construct()
{
// Call the Model constructor
parent::__construct();
$this->load->database();
}
public function insert_into_db()
{
$data = array(
'id' => '0',
'user_active' => '1',
'user_level' => '2',
'user_displayname' => $this->input->post('user_displayname'),
'user_email' => $this->input->post('user_email'),
'user_name' => $this->input->post('user_name'),
'user_password' => $this->input->post('user_password')
);
$this->db->insert('ci_users', …Run Code Online (Sandbox Code Playgroud)