background preloader

Server-side

Facebook Twitter

MySQL or SQL Server: Look beyond politics and hype when deciding which to use. MySQL may be free, but what if money isn't the only determining factor? Find out how these two database heavyweights stack up against each other and how to decide which one to use as your database system. Two of the most popular back-end data stores Web developers work with today are MySQL and SQL Server. They are fundamentally similar in that both are data storage and retrieval systems.

You can use SQL to retrieve data with either because both claim support for ANSI-SQL. Both database systems support primary keys and key indices, so you can also create indices used simply to speed up queries and for constraining input. Aside from the obvious difference of price, what distinguishes these two products from each other, and how do you choose between them? Core principles are the root differencesThe differences begin with principles: open vs. proprietary. This open vs. closed difference is, by itself, enough reason for some folks to choose one over the other. Which do you use, and why? Python Programming Language – Official Website. The Perl Programming Language - www.perl.org. MySQL :: The world's most popular open source database. Choosing an API. 13.2.8 SELECT Syntax. 11.1 Data Type Overview. Using MySQL from PHP.

By John Coggeshall 02/19/2004 Welcome back to PHP Foundations. My previous column finished the crash course on using MySQL to store and retrieve data from a database using the Structured Query Language (SQL). In today's column, I will begin to use everything I have shown you thus far to work with and create database-driven web pages using PHP. Let's get started by discussing how a database interacts with a web application. Database-Driven Architecture For those of you who have been reading my column on a regular basis since it began (thank you, I'm aware of at least a few of you), way back in 2001 I provided you with a flow diagram outlining how PHP works within a web server. Back then, the diagram was pretty generic, but today I'll revisit it in more detail to describe a database-driven architecture. The web server receives the request via HTTP for a particular web page and resolves and retrieves the requested file.

We will focus on steps three and four in our discussions here. Using MySQL from PHP, Part 2. By John Coggeshall 03/18/2004 Hello again, welcome back to PHP Foundations. In my last column, I introduced some of the basic functions used when accessing a MySQL database from PHP. With what you have learned so far, you should now be able to perform queries and access the result sets from within your PHP scripts. However, there are still several things to learn. Today I'll explain dealing with errors, determining the number of rows in a result set, and more. Let's get started. Useful MySQL/PHP Functions Dealing with Errors When Working with MySQL Now that you know how to connect to, query, and work with databases, it's time to discuss what to do when things go wrong, as they surely will.

Mysql_error([$link]); mysql_errno([$link]); where the optional parameter $link represents the database connection for which to retrieve the last error message. To illustrate the use of these functions, consider the following small code snippet. Determining Result Counts mysql_num_rows($result); MySQL Functions. Here a mysql helper containing the main functions of the mysql extension. It's easy to understand for a beginner and quite useful because queries are secure. It understands what you want, just write your sql query. I called it mysql_magic. <? Php$nb_affected = mysql_magic('delete from users');$nb = mysql_magic('select count(*) from users');$one_row = mysql_magic('select * from users limit 1');$all_rows = mysql_magic('select * from users where name = ?

', 'John');$id = mysql_magic('insert into users(name,rank) values(? Function mysql_bind($sql, $values=array()) { foreach ($values as &$value) $value = mysql_real_escape_string($value); $sql = vsprintf( str_replace('? ' function mysql_fetch_all($result) { $resultArray = array(); while(($resultArray[] = mysql_fetch_assoc($result)) || array_pop($resultArray)); return $resultArray; } Welcome! - The Apache HTTP Server Project. Overview of the .NET Framework. The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime. With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer).

This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application. The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. In addition, the managed environment of the runtime eliminates many common software issues. Home : The Official Microsoft IIS Site. Web Platform - Server, IIS, Internet Information Services. Internet Information Services (IIS) 8.5 in Windows Server 2012 R2 provides a secure, easy-to-manage, modular and extensible platform for reliably hosting websites, services and applications.

With IIS, you get choice and control without giving up reliability or security. Customize and add new features, such as application request routing and load balancing through free IIS Extensions. Maximize web security through a reduced server foot print and automatic application isolation. Easily deploy and run both ASP.NET and PHP web applications on the same server. Get it all with IIS. Learn how to get started on the IIS.NET website.

Easy to get. Get everything you need to start running and hosting web applications with IIS using the Microsoft Web Platform Installer. Can't we all get along? From ASP.NET to PHP, IIS provides a powerful and flexible Web server for the world's most popular Web applications such as Umbraco, WordPress and Drupal. More bang for your buck Use only what you need Performance. Visual C# Resources. ASP.NET Overview. The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location. ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding.

ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Framework. You can code your applications in any language compatible with the common language runtime (CLR), including Microsoft Visual Basic and C#. These languages enable you to develop ASP.NET applications that benefit from the common language runtime, type safety, inheritance, and so on. This topic describes the following features of ASP.NET and of Visual Web Developer, the development environment for creating ASP.NET applications. Visual Web Developer is a full-featured development environment for creating ASP.NET Web applications. Testing and Debugging. Hypertext Preprocessor. An Introduction to PHP.

What exactly is PHP anyway? PHP is short for what is officially called "PHP: Hypertext Preprocessor. " PHP was created by Rasmus Lerdorf, a developer who needed a tool to keep track of who was looking at his resume. The first version of Lerdorf's preprocessor (known then as PHP/FI) was released in 1994. Since then, PHP has become popular in the open-source community and was renamed PHP with the release of version 3.0. PHP is now at version 4.0 and is used by over 3 million web sites on the Internet. PHP represents a robust open-source development language that provides the tools and flexibility to accomplish virtually any task. PHP is an embedded language which means developers can jump between raw HTML code and PHP without sacrificing readability.

So what can it do? At a fundamental level, PHP has all of the features of a complete programming language (control structures, repetitive tasks, and variables) but perhaps one of its most powerful features is database access. How does it work? Basic PHP Syntax. By John Coggeshall 03/08/2001 This article covers basic PHP syntax, including variable usage, variable types, and several ways of printing variables to the web browser. Embedded code blocks PHP is an embedded web development language with many similarities to commercial packages such as Microsoft's Active Server Pages (ASP) or Cold Fusion.

One of the similarities between PHP and these packages (especially ASP) is the ability to jump between PHP and HTML code quickly and easily. The basic syntax to jump in and out of PHP follows: <html><head><title>My first PHP page</title></head><body> This is normal HTML code <? Php // PHP code goes here ? In this example, we see that PHP code is signified by the use of the <? So, for example, let's say that you are a web developer who uses a third-party software package to do the actual layout of your web pages. General syntax Before we discuss variables, we should begin with some general PHP syntax rules.

Variables in PHP Types of variables Type 3: The string. Control Structures. If you are not sure what will work in your IF statements, try DISECTING your variables. Below I've written three (3) empty CLASS DEFINITIONS (Point, Dimension, and Rectangle), and declared an array called $items that holds all the PHP types you can imagine -- booleans, strings, empty strings, integers, floats, null, arrays, empty arrays, and objects too. The rest of the code really chews up the current $item and spits it out for lunch...

Try running this code so you can see the HTML TABLE that is created -- it'll be worth your while. <? Php class Point { } class Dimension { } class Rectangle { } $items = array(true, false, null, 23, 0, -26, 4.21, 0.0, -3.76, 'hello', '', array(1, 2, 3), array('', '', ''), array(), new stdClass(), new Point(), new Dimension(), new Rectangle()); echo '<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr>' . Foreach($items AS $item) { $booleanValue = (boolean)$item; $empty = (empty($item) ?

Arrays. Superglobals. Error Control Operators. If you use the ErrorException exception to have a unified error management, I'll advise you to test against error_reporting in the error handler, not in the exception handler as you might encounter some headaches like blank pages as error_reporting might not be transmitted to exception handler. So instead of : <? Php function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); function catchException($e) { if (error_reporting() === 0) { return; } set_exception_handler('catchException'); ? Function exception_error_handler($errno, $errstr, $errfile, $errline ) { if (error_reporting() === 0) { return; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } function catchException($e) { }

PHP Error Handling. Include. Htmlspecialchars. Problem In many PHP legacy products the function htmlspecialchars($string) is used to convert characters like < and > and quotes a.s.o to HTML-entities. That avoids the interpretation of HTML Tags and asymmetric quote situations. Since PHP 5.4 for $string in htmlspecialchars($string) utf8 characters are expected if no charset is defined explicitly as third parameter in the function. Legacy products are mostly in Latin1 (alias iso-8859-1) what makes the functions htmlspecialchars(), htmlentites() and html_entity_decode() to return empty strings if a special character, e. g. a German Umlaut, is present in $string: Three alternative solutions a) Not runnig legacy products on PHP 5.4 b) Change all find spots in your code from htmlspecialchars($string) and *** to htmlspecialchars($string, ENT_COMPAT | ENT_HTML401, 'ISO-8859-1') c) Replace all htmlspecialchars() and *** with a new self-made function *** The same is true for htmlentities() and html_entity_decode(); Solution c.

Apache Tomcat - Welcome! And Java | Technologies.