That's not up to the view script. You fetch the values from the database in
your controllers or much better in your service layer. Then those variables
are passed to a view model, and therefore by the view script.

I suggest you to read the user guide at
http://framework.zend.com/manual/2.2/en/user-guide/overview.html

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 7 July 2013 19:01, syngress <[email protected]> wrote:

> I want to pass (values) from database to variables.
> For example (my edit.phtml view script):
>
> EXAMPLE:
> For adres: *../framework/public/edit/1*
>
>
>
> In normal project, that will be:
> $query = "SELECT id FROM table WHERE id=1";
>
> ANOTHER EXAMPLE:
> For adres: *../framework/public/edit/3*
>
>
>
> In normal project, that will be:
> $query = "SELECT id FROM table WHERE id=3";
>
> I hope that I have explained well enough what I mean ..
> I intend to make every view script had the opportunity to pass values
> ​​from
> the database to a variable.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Zend-2-Skeleton-how-to-get-row-where-id-X-tp4660530p4660534.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to