mysql select statement to generator code?
mysql select statement to generator code?
wyatt121
Posts: 9Questions: 1Answers: 0
Hi,
I used the generator to get a quick functional table working. Yet, now I want to add a quick simple mysql select statement to only pull the records I'm looking for into the table. I have this statement. Where do I add it to make it work?
select * from TABLE where x = '1';
I've tried deciphering the documentation, but I'm unfortunately a bit overwhelmed by the complexity. Any help is much appreciated.
Thank You.
Wyatt
This discussion has been closed.
Replies
Hi Wyatt,
You need to add a
where()
method to your PHP Editor code (assuming you are using the PHP libraries?). The documentation for that is available here.For example you might use:
Allan
Hi Allan,
Thank you for your help! Yes, I am using php libraries. Which file do I add this Editor code to?
Wyatt
Wherever the code that you are using the Editor class (
table.{name}.php
if you used Generator). Obviously the above is pseudo code - don't just copy and paste the whole block. It shows only where you would include thewhere()
method.ALlan