TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-09-2008, 03:36 PM   #1 (permalink)
The Contributor
 
Devels's Avatar
 
Join Date: Nov 2007
Posts: 27
Thanks: 2
Devels is on a distinguished road
Default Zend Framework Model

How do you guys design a typical 'good' model?
I see alot of examples of models that extends Zend_Db_Table or Zend_Db_Select.
I don't like the way working with table relationship with Zend_Db_Table.
I just want to write complex SQL statements, prepare them and execute them. What is the way to do that?

Last edited by Devels : 09-09-2008 at 04:54 PM.
Devels is offline  
Reply With Quote
Old 09-09-2008, 06:45 PM   #2 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Mysqli prepared statements be of any use?

nice tutorial:
ext/mysqli: Part I - Overview and Prepared Statements
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 09-09-2008, 07:50 PM   #3 (permalink)
The Contributor
 
Devels's Avatar
 
Join Date: Nov 2007
Posts: 27
Thanks: 2
Devels is on a distinguished road
Default

Quote:
Originally Posted by sketchMedia View Post
Mysqli prepared statements be of any use?

nice tutorial:
ext/mysqli: Part I - Overview and Prepared Statements
I already understands preparing, I need to know how to implement this using Zend Framework.
Devels is offline  
Reply With Quote
Old 09-10-2008, 10:37 AM   #4 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Sorry, i misunderstood. But your question led me to believe that you wanted an alternative to the zend framework:

Quote:
I just want to write complex SQL statements, prepare them and execute them. What is the way to do that?
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 09-10-2008, 12:14 PM   #5 (permalink)
The Contributor
 
Devels's Avatar
 
Join Date: Nov 2007
Posts: 27
Thanks: 2
Devels is on a distinguished road
Default

Quote:
Originally Posted by sketchMedia View Post
Sorry, i misunderstood. But your question led me to believe that you wanted an alternative to the zend framework:
I'm looking for good examples of models querying the database, with static functions.
Devels is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 06:47 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design