Re: [PHP] news and article posts in one table
On Sat, Nov 26, 2011 at 01:26:49PM -0600, Tamara Temple wrote: > muad shibani wrote: > > > i wanna to create one table that contains both news and articles posts, > > they have similar columns like id, title, content, and date but they are > > differ in one column = the source of news or article post > > article has writers that have permanent names and pictures obtained from > > another table called writers that supposed to be left joined with the news > > table, while news posts simply have a source as text like AFP > > or Reuters and so one. > > > > How I can solve this ? > > How you store things in tables can sometimes get a little tricky. One > way to approach this is with normalized tables and using joins in your > query like you are doing. To make this work, in your main entries table, > have a field that indicates what the entry type is. If you are doing one > select that gets both articles and news stories, having that extra field > can help you distinguish what type it is, and which fields contain data > in each record. > > (cf: Wordpress wp_posts table for an example of how this is done. They > store posts, pages, and attachments in a single table this way. I can't > say if this is a better arrangement than keeping them in separate > tables.) I've had to hack this table. It's a prime example of bad design. Take a long look at the records of this table in an active blog, with a survey of each of the fields and their values. You'll see what I mean. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a decent design app ?
On Nov 25, 2011, at 16:18, "Andreas" wrote: > Like you have /foo.css and for some reason or another you move it to > /lib/css and rename it to bar.css. > Now it'd be nice if an IDE was aware of all the references within a site > and update the affected urls. Check out PhpStorm from JetBrains. I know it handles rename-refactors of PHP files, functions, and classes, and I'm nearly positive it does the same HTML/CSS/JS files, as well. Ad it's a darn good IDE, to boot. -- Bob Williams Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP based online survey tool
Christopher Lee wrote: > I am looking to develop an online survey for a non-profit. The user > should be able to complete the survey and see the results in the form > of a visualization (i.e. pie chart) upon completion. I found this tool > (http://www.iscripts.com/survey/) but not sure how good it is. Does > anyone have any suggestions for PHP based online survey tools? Any > suggestions would be greatly appreciated. Thank you all in advance. I dunno, it's free, why not just snag it and play with it? From a quick run through the demo, it looks to be pretty flexible and feature laden. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP based online survey tool
Hello All, I am looking to develop an online survey for a non-profit. The user should be able to complete the survey and see the results in the form of a visualization (i.e. pie chart) upon completion. I found this tool (http://www.iscripts.com/survey/) but not sure how good it is. Does anyone have any suggestions for PHP based online survey tools? Any suggestions would be greatly appreciated. Thank you all in advance. Best, Christopher This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
Re: [PHP] Auto CRUD Generator
On 11/26/2011 10:20 PM, Muhammad Hassan Samee wrote: is there any class/script that can automatically create a CRUD [Create,Read,Update,Delete] grid table for any database table .? Hi Hassan, check my blog there are some functions I have been working on. it might give you some ideas. http://blog.teknober.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto CRUD Generator
is there any class/script that can automatically create a CRUD [Create,Read,Update,Delete] grid table for any database table .?
[PHP] Auto CRUD Generator
is there any class/script that can automatically create a CRUD [Create,Read,Update,Delete] grid table for any database table .?
Re: [PHP] news and article posts in one table
muad shibani wrote: > i wanna to create one table that contains both news and articles posts, > they have similar columns like id, title, content, and date but they are > differ in one column = the source of news or article post > article has writers that have permanent names and pictures obtained from > another table called writers that supposed to be left joined with the news > table, while news posts simply have a source as text like AFP > or Reuters and so one. > > How I can solve this ? How you store things in tables can sometimes get a little tricky. One way to approach this is with normalized tables and using joins in your query like you are doing. To make this work, in your main entries table, have a field that indicates what the entry type is. If you are doing one select that gets both articles and news stories, having that extra field can help you distinguish what type it is, and which fields contain data in each record. (cf: Wordpress wp_posts table for an example of how this is done. They store posts, pages, and attachments in a single table this way. I can't say if this is a better arrangement than keeping them in separate tables.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a decent design app ?
Andreas wrote: > Is there a decent design app that can automatically update links > within the pages of a php site whenever a referred file gets moved or > renamed? > > Like you have /foo.css and for some reason or another you move it to > /lib/css and rename it to bar.css. > Now it'd be nice if an IDE was aware of all the references within a > site and update the affected urls. Last time I used Dreamweaver, it seemed to be able to manage this, at least partially... This is akin to refactoring, but I don't know of any apps that do that very well for PHP/HTML/CSS/JS/... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP exercises
Larry Garfield wrote: > Hi folks. A friend of mine is trying to learn PHP. She already knows > programming basics, but wants to learn PHP specifically. However, she > learns much better with assignments or exercises than just from > reading articles or books. > > The only site I've found so far is PHP Exercises > (http://phpexercises.com/), but it of course went offline the day > after I found it. Fail! > > Can anyone recommend other sources for tutorial-based or > exercise-based PHP learning? Paid is OK if it's not too expensive and > it's worth the money, although free is always preferred. > > TIA and all that. > > --Larry Garfield > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Take a look @ http://codekata.pragprog.com/ -- they have a whole set of "kata" for practice in programming. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Tutorial for the structure of an php-app ?
On Sat, Nov 26, 2011 at 01:38:28AM +0100, Andreas wrote: > Hi again, > is there a tutorial for the structure of an php-app? > > There are more than enough books and online docs that teach the > basics of PHP and of course the native mysql commands. > > I'd now rather need a help to figure out how to pull up a wee bit > more complex app. > I know how to connect to a DB even though it might not be mysql. I > can select stuff and dump it into a HTML table. > Actually I prefer PDO and PostgreSQL. > > Is there a tutorial that teaches how to construct a app with a > 2-column design. > E.g. a menue frame on the left and a bigger content area on the right. > So a click on a menue item would dynamically display a form or a > list in the content area. > What is a good way to glue everthing together between login and logout. > I know cookies and sessions and I suspect those were a way to do it. > How would I integrate a template system like smarty? > It weren't bad if there were clues about AJAX, too. > > I'm in search of a way to extend the knowledge about bricks, tubes > and cables to the wisdom to actually build a house out of those > things. Aside from the fact that, yes, much of what you're asking for has to do with the user interface and not PHP, there is no ONE way to build a PHP app. PHP is flexible enough to allow you to do it any of a number of ways. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5.3.8, 5.3.9RC2 & 5.4.0RC2 handler for Apache 2.3.15
The module php5apache2_3.dll for Apache 2.3.15 with PHP version 5.4.0RC2, 5.3.9RC2 and 5.3.8 now available. See http://www.apachelounge.com/viewtopic.php?p=19861 Steffen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 5.3.9RC2 and 5.4RC2
Hi everyone, 5.3.9RC2 works fine with all my apps so far. 5.4RC2 broke with sqlsvr and its PDO in addition to Wincache, which I've already brought to MS' attention. What's the estimated official release of 5.4? I can't wait for the feature session.upload_progress* in 5.4 which I need to do some testing as how I can implement that into my existing apps!!! That's just awesome!! Thanks for all your continuous hard work :) Platform: Win08R2/IIS7.5 SP1 with current patches running PHP as FastCGI. Applications: drupal, joomla, mediawiki, wordpress, and a few of my own :) Cheers, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php