Thanks for taking time to help me :P
Originally Posted by
ramjet
ga.n are talking in pseudo code.... there is no x,y,z,a... they just stand for things.
This was rather clear
I was just wondering wether it was possible to set a value for 'a' from outside of the function.
In fact, I see no real advantage to code that:
Code:
$qry = " SELECT id, price, fruit-type FROM tl_myfruit WHERE fruit-type=? ";
$objRow = $this->Database->prepare($qry)->execute('banana');
when it could be simply written:
Code:
$qry = " SELECT id, price, fruit-type FROM tl_myfruit WHERE fruit-type='banana' ";
$objRow = $this->Database->prepare($qry)->execute();
or I am wrong?
Originally Posted by
ramjet
It depends on what your module is doing, but "a" can be any string, number or variable you want.
Fact is I would like to use the same query with different values for the WHERE clause, but I don't know how to set the parameter a different value each time (I know how to do it in "ordinary" PHP, but not in POO-Class-Object mode).
Bookmarks