Welcome Guest, Not a member yet? Register   Sign In
How can I use findAll with select in model?
#1

Hi!
I try to like this, but it's error of SQL syntax.



PHP Code:
$model model('MyModel');

//It's Okay!
$model->where('column1','value')->findAll();

//It's error
$model->select('column1, column2')->findAll(); 



Im trying to use builder, like this

PHP Code:
$builder $model->builnder();
$builder->select('column1, column2');
...
$model->findAll(); 



the error message is 
(SELECT COUNT(*) FROM TABLE WHERE IDX = ....' at line 1


Can I use select method with findAll in model?
if I can't, what I do another option?

Thank you
Reply


Messages In This Thread
How can I use findAll with select in model? - by asrahi - 04-04-2021, 06:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB