Welcome Guest, Not a member yet? Register   Sign In
CI.1.7 - $db->from() with $db->get()
#1

[eluser]Josip Jelic[/eluser]
I dont'n know if this is bug or new feature...

In Database Acrive record class using both $db->from("news") and $db->get("news", 10, 0) results in database error which wasn't the case in 1.6. It produces SELECT * FROM news, news which results in MySQL error: #1066 - Not unique table/alias: 'news'.

Is this expected behavior?

Documentation says:
Note: As shown earlier, the FROM portion of your query can be specified in the $this->db->get() function, so use whichever method you prefer.



Cheers
#2

[eluser]dmiden[/eluser]
Why would you want to use both?
$this->db->get(“news”, 10, 0) is enough?
#3

[eluser]Josip Jelic[/eluser]
I agree, but in previous versions it wasn't an issue. And I'm not talking only about 1.6.3. - I'm talking about 1.7.0. from SVN just days ago.

I'm only checking if this is intentional or not.

$db->from() is then pretty much useless when you have to define table in $db->get() anyway - but ok.

cheers!




Theme © iAndrew 2016 - Forum software by © MyBB