CodeIgniter Forums
Router - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Router (/showthread.php?tid=66212)

Pages: 1 2


RE: Router - Ljubin - 09-24-2016

(09-23-2016, 04:26 PM)wolfgang1983 Wrote:
(09-23-2016, 01:35 PM)Ljubin Wrote: Thanks guys for halp, but i will stay at CI 2.1
There one more error.
Don't work this SQL request in CI 3.1.!?
PHP Code:
$sql "select * from (select * from net_euro where begin_ip<=$int order by begin_ip desc limit 1) as t where end_ip>=$int";
$result mysql_query($sql); 
Variable "$result" is empty.
Perhaps this is not the end. Confused

This may help $query = $this->db->query("YOUR QUERY");

http://www.codeigniter.com/user_guide/database/results.html#result-arrays

I use plugins other developers. In their code they often use - SQL queries.
Rewrite their code is very inconvenient.


RE: Router - mwhitney - 09-26-2016

(09-24-2016, 02:27 AM)Ljubin Wrote:
(09-23-2016, 04:26 PM)wolfgang1983 Wrote:
(09-23-2016, 01:35 PM)Ljubin Wrote: Thanks guys for halp, but i will stay at CI 2.1
There one more error.
Don't work this SQL request in CI 3.1.!?
PHP Code:
$sql "select * from (select * from net_euro where begin_ip<=$int order by begin_ip desc limit 1) as t where end_ip>=$int";
$result mysql_query($sql); 
Variable "$result" is empty.
Perhaps this is not the end. Confused

This may help $query = $this->db->query("YOUR QUERY");

http://www.codeigniter.com/user_guide/database/results.html#result-arrays

I use plugins other developers. In their code they often use - SQL queries.
Rewrite their code is very inconvenient.

mysql_query() has been deprecated in PHP for quite some time. If you upgrade to PHP 7, mysql_query() will not work, and that has nothing to do with CodeIgniter. CodeIgniter developers (and even most general PHP developers) should not have been using mysql_query(), anyway.


RE: Router - InsiteFX - 09-27-2016

Warning
This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.