CodeIgniter Forums

Full Version: Using constants within db requests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]newtonianb[/eluser]
I've defined a bunch of constants for each of my tables to keep things organised, now how can I use them in my requests?

If I try something like below
$this->db->from(DBTABLE_MYTABLEB . ' m');

I get error as it tries to use DBTABLE_MYTABLES as the actual value. I remember reading in the docs you could specify a third argument to prevent data from being escape but how can I make that happen for from and db related functions that are not 'set'

El Forum

[eluser]newtonianb[/eluser]
please delete, it actually works I just defined the constant in the wrong project Smile
thanks