Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Avoid conflict between column names ?

$
0
0
Hello to the great CI community !

Before i used to write my columns names as follow : 

[dbprefix]_[tablename]_[columnname] for example abc_recipes_name 

It avoided any conflict with other tables in case of joining for example.
but seems nobody do that except me, so i'm back to just the column name but in case of joining it cause some issues. 


My actual way of fixing is to use aliases in the SELECT but i'm not sure if it's the best practice, it's a bit of messy.

Is there any better way using CI ? 

Thanks a lot,

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>