DevelopPHP
home gear home donate
Search Results For
in:

Libraries book

HTML Library CSS Library JavaScript Library PHP Library

Videosbook

PHP and MySQL JavaScript HTML and CSS Vector and 3D Flash Actionscript Android Dev Miscellaneous

Resourcesbook

Website Hosting Developer Q+A
<iframe width="560" height="315" src="http://www.youtube.com/embed/yTudF1CAKY0" frameborder="0" allowfullscreen></iframe>
You can embed this video on your blog or web page by copying the video embed code above and pasting it into the source code of your page. Adjust the width and height to specify the size you would like it to display.
Thumb 1. MySQL PHP Search Programming : Create and Populate Example Tables Script
Embed Source - http://www.youtube.com/watch?v=yTudF1CAKY0
Publish Date - Oct 11, 2011     Author - Adam Khoury
1. MySQL PHP Search Programming : Create and Populate Example Tables Script
Part 1 of MySQL PHP Search Programming Exercises and tutorials for database driven web sites. Search pages that allow advanced targeting and filtering of information. Learn to build HTML Search Forms and Advanced Search Filters, Various MySQL Search Query Methods, Joined Table Queries Targeting Multiple Tables, Natural Language Full-Text Search Queries, Boolean Full-Text Search Queries and discuss fine tuning your search programming and adjusting search parameters.
Lesson Code
<?php
/*********************************************************
MySQL PHP Search Exercises by Adam Khoury @ developphp.com
MySQL Database Version Used In the Lessons: 5.1.58
PHP Version Used in the Lessons: 5.2.17
For Code Logic and Code Explanations Watch the Videos
*********************************************************/
// This script is for auto creating and populating two tables
// needed for the exercises in this series
// ------------------------------------------------
// Force script errors and warnings to show during production only
error_reporting(E_ALL);
ini_set('display_errors', '1');
// Connect to your MySQL database here
include_once("connect_to_mysql.php");
// Create the table 1 for storing pages
$sqlCommand = "CREATE TABLE pages (
               id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
               page_title VARCHAR(255),
               page_body TEXT,
       page_views INT NOT NULL default '0',
               FULLTEXT (page_title,page_body)
               ) ENGINE=MyISAM";
$query = mysql_query($sqlCommand) or die(mysql_error());
echo "<h3>Success creating Pages table</h3>";
// Create the table 2 for storing Blog entries
$sqlCommand = "CREATE TABLE blog (
               id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
               blog_title VARCHAR(255),
               blog_body TEXT,
       blog_views INT NOT NULL default '0',
               FULLTEXT (blog_title,blog_body)
               ) ENGINE=MyISAM";
$query = mysql_query($sqlCommand) or die(mysql_error());
echo "<h3>Success creating Blog table</h3>";
// Insert dummy data into the pages table
$sqlCommand = "INSERT INTO pages (page_title,page_body) VALUES
              ('PHP Random Number','Learn to generate a random number using PHP blah blah blah'),
              ('Javascript Clock','Build a Javascript digital clock in this tutorial blah blah blah'),
              ('Flash Gallery','Use Actionscript to build a Flash Photo gallery blah blah blah'),
              ('XML RSS FEED','Learn to assemble XML RSS Feeds for your website blah blah blah'),
              ('CSS Shadows','Learn text and container shadow techniques using CSS blah blah blah'),
              ('HTML5 Canvas Tag','Learn how to animate the HTML5 Canvas tag using blah blah blah'),
      ('PHP Calculator','Learn to build a working calculator using PHP and blah blah blah'),
              ('Flash Website','Learn to create a full flash website template blah blah blah')";
$query = mysql_query($sqlCommand) or die(mysql_error());
echo "<h3>Success populating the pages table with data</h3>";
// Insert dummy data into the blog table
$sqlCommand = "INSERT INTO blog (blog_title,blog_body) VALUES
              ('Trip to Disney World','Disney world would have been fun if I were 10 blah blah blah'),
              ('Refrigeration School','I graduated school finally after blah blah blah'),
              ('Big Giant Doodoo','In the bathroom today I made the biggest doodoo blah blah blah'),
              ('New Pet Bird','Today I got a new bird that repeats everything blah blah blah'),
              ('Pet Bird Died','My cat ate my bird today so as punishment I blah blah blah')";
$query = mysql_query($sqlCommand) or die(mysql_error());
echo "<h3>Success populating the blog table with data</h3>";
?>

Home   •   Terms of Use   •   T-Shirts   •   RSS   •   Testimonials   •   Subscribe   •   Classroom Chalkboard   •   Developer Q+A   •   Donate   •   Top ↑
Popular In PHP / MySQL E-Commerce Store Production
Social Network Website Building
Image Upload / Photo Processing
CMS Software Programming
Mass Email Systems
Magic XML Data
Search Programming
Popular In JavaScript JSON Programming
Ajax Programming
Animating Elements
WYSIWYG Programming
Date/Time Programming
DOM Scripting
Object Reference
Popular In HTML Canvas Element
New Form Elements
Audio Element
Video Element
Drag and Drop
Event Handling
Element Grouping
Popular In CSS Custom Font Embedding
Dynamic Fit Backgrounds
Theatre Mode
Box Overlays
CSS Level 1 Properties
CSS Level 2 Properties
CSS Level 3 Properties
DevelopPHP.com is a growing educational system packed with video and written material that you can access 24/7 100% free. The focus here in 2013 is spread between five technologies: HTML, CSS, JavaScript, PHP and MySQL. Learn programming theory, database interaction, web design, animation, graphics editing, vector art, 3D modeling, and much more. The educational experience here is a hybrid one offering both high quality video tutorials and code libraries that grow more robust every day. The code libraries are being assembled so that developers can discover all of the building blocks of their favorite languages. The libraries coupled with high quality video tutorials will take you deep down the rabbit hole very quickly. You can also ask questions and get free advice at WebIntersect.com.
©2014 DevelopPHP.com HTML5