Your Daily Source for Apache News and Information  
Breaking News Preferences Contribute Triggers Link Us Search About
Apache Today [Your Apache News Source] To internet.com

Apache HTTPD Links
The Jakarta Project
Apache Project
The Apache Software Foundation
Apache Module Registry
The Apache FAQ
Apache XML Project
The Java Apache Project
Apache-Perl Integration Project
Apache-Related Projects
PHP Server Side Scripting
ApacheCon
The Linux Channel at internet.com
Linux Planet
Linux Programming
Linux Central
Linux Start
BSD Today
Linux Apps
Apache Today
All Linux Devices
Linux Today
Just Linux
Linuxnewbie.org
BSD Central
PHPBuilder
Enterprise Linux Today
SITE DESCRIPTIONS
dotcomma: Efficient SQL in PHP
Jun 11, 2000, 06 :20 UTC (0 Talkback[s]) (640 reads) (Other stories by Electrum)

[ Thanks to for this link. ]

"There are many articles that will tell you how to connect to a database with PHP, perform simple queries and work with the results. This article will not cover those basics. The purpose of this article is to cover some of the less obvious things that can be done when working with SQL, and how to utilize them with PHP. SQL is a very powerful language and can do many things if used correctly and efficiently."

"I will be using MySQL as the database for this article, simply because more beginning PHP programmers use it than any other database. The first database I used with PHP was PostgreSQL, and most if not all of these examples will work with it simply by calling the equivalent PostgreSQL functions. For a working example of PostgreSQL functions, see the Assembly Coder's Zenith website. The footer on every page of the main site has a link to view the source code of the page (shameless plug, I know)."

"Good coding practices and standards will save you many hours in both development time and in debugging. This cannot be emphasized enough. Many times while programming I will end up writing the same few lines of code over and over. When I realize this, I will write a function to handle it and change all the code into function calls. Sure, it takes a few minutes, but then the next time the code is needed, a mere function call is all that it takes. And the code is easier to read. If you find yourself doing a lot of copy/paste coding, consider using a function call. When you are done with a project you will likely have many functions written. You will be able to move many of these into a shared include file. Instead of writing new code on your next project, you will be able to use the already functions immediately. Another reason using a function is important is that it allows you to do more error checking than might normally be done."

Complete Story

  Current Newswire:
Everything Solaris: Apache: Handling Traffic

LinuxEasyInstaller 2.0 final release

Apache 2.0.32 beta is available

Everything Solaris: Apache: The Basics

Apache Jakarta James Mailserver v2.0a2 Released

PostgreSQL v7.2 Final Release

Daemon News: Multiple webservers behind one IP address

Zend Technologies launches Zend Studio 2.0

NuSphere first to enable development of PHP web services

Covalent Technologies raises $18 million in venture capital


No talkbacks posted.
Enter your comments below.
Your Name: Your Email Address:


Subject: CC: [will also send this talkback to an E-Mail address]
Comments:

See our talkback-policy for or guidelines on talkback content.

About Triggers Media Kit Security Triggers Login


All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux 2.4, Apache 1.3, and PHP 4
Copyright 2002 INT Media Group, Incorporated All Rights Reserved.
Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.internet.com/