Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: set sql variable before main query
Post: RE: set sql variable before main query

php_rocs Wrote: (02-13-2019, 09:27 PM) -- @ash-f, Documentation for future reference (of query results)... https://codeigniter.com/user_guide/database/results.html#generating-query-results -- Th...
4,922 Views
7 Replies
02-14-2019, 01:43 PM
ash-f
    Thread: set sql variable before main query
Post: RE: set sql variable before main query

Ok, I've used two successive $this->db->query() Code: -- $randomitem=array(); $valquery = "SELECT @rid := FLOOR(1+RAND()*item_id) FROM products ORDER BY item_id DESC LIMIT 1"; $this->db->query($v...
4,922 Views
7 Replies
02-12-2019, 11:33 PM
ash-f
    Thread: set sql variable before main query
Post: RE: set sql variable before main query

php_rocs Wrote: (02-08-2019, 05:46 PM) -- @ash-f, Yes, it is possible to set sql variable before other queries.  The catch is...not the way you have it in your example.  There are a couple of ways...
4,922 Views
7 Replies
02-12-2019, 10:18 PM
ash-f
    Thread: set sql variable before main query
Post: RE: set sql variable before main query

InsiteFX Wrote: (02-09-2019, 05:16 AM) -- PHP Code: -- $this->db->where('(item_id > @min_id',NULL,FALSE); -- Are you missing a parentheses /  bracket here? -- That is a typo created when I copy&...
4,922 Views
7 Replies
02-12-2019, 10:16 PM
ash-f
    Thread: set sql variable before main query
Post: set sql variable before main query

Is it possible to set sql variable before other queries?(not $this->db->query()) I'd like to do something like this. PHP Code: -- $this->db->query("SET @min_id := (SELECT min_id FROM shop_par...
4,922 Views
7 Replies
02-08-2019, 04:02 PM
ash-f
    Thread: non-latin url routing
Post: RE: non-latin url routing

Yes it's escaping related. I'd like to make a rule using unescaped text but that's not possible on 3.x.
3,152 Views
2 Replies
07-02-2018, 01:20 AM
ash-f
    Thread: non-latin url routing
Post: non-latin url routing

I'd like to request an ability to handle non-latin url(such as Asian or Arabic language) on routing. on 3.x, it does not handle those correctly.
3,152 Views
2 Replies
06-30-2018, 02:42 PM
ash-f
    Thread: Getting real IP behind a Proxy
Post: RE: Getting real IP behind a Proxy

One way to retrieve real ip is to put this code on initialization(I used this for Cloudflare) if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $xffaddrs = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']...
15,116 Views
12 Replies
10-08-2017, 01:04 PM
ash-f

Theme © iAndrew 2016 - Forum software by © MyBB