3 deleted 1 character in body
source | link

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

endand if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I foundfind this handy if I would use more than one WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

end if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I found this handy if I would use more than one WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

and if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I find this handy if I would use more than one WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

2 added 1 character in body
source | link

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

end if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I found this handy if I would use more than onone WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

end if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I found this handy if I would use more than on WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

end if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I found this handy if I would use more than one WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?

1
source | link

Active DB queries in Wordpress?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something

a normal SELECT query for example in Codeigniter with active records would look like if I assume I init my DB instance in both of the cases inside of a Class as $this->db

$data = $this->db->get('wp_mytable');
$data->result();

Wordpress way

$data = $this->db->get_results('SELECT * FROM wp_mytable');

end if I would use a condition than would look like

$this->db->select('*');
$this->db->from('wp_mytable');
$this->db->where('id', 1);
$this->db->result();

I found this handy if I would use more than on WHERE as array

but I do not see this kind of query types in wordpress wiki or I do not search in the right place?