News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

AndroidHive:
Android Login and Registration with PHP, MySQL and SQLite
February 02, 2012 @ 10:41:21

On the AndroidHive site there's a recent tutorial (plus screencast) about combining PHP, MySQL and SQLite to act as the backend authorization for your Android application.

In my previous article Android Login and Registration Screen Design i explained designing the login and registration interfaces, but it has no functionality. In this tutorial i am explaining how to build complete login and registration system in android using PHP, MySQL and SQLite. Also this tutorial covers how to build simple API using PHP and MySQL.

The tutorial walks you through each step of the process:

  • Creating MySQL Database and Tables
  • Building PHP API Classes
  • Starting Android Project
  • Making the JSON Parser, SQLite Database Handler and User Functions Classes
  • Designing the Screens
  • Switching between Activities
  • Finally Updating AndroidManifest.xml

If you want to get started quickly, you can just download the final result and go.

0 comments voice your opinion now!
android api login authentication mysql sqlite application mobile


php|architect:
Full-text Search with SQLite
November 15, 2011 @ 09:53:50

On the php|architect site there's a recent tutorial from Jeremy Kendall about full-text searching in SQLite, a lightweight database alternative that, since it's stored locally, can be used without a full database server.

Full-text search with SQLite is so ridiculously easy to implement, there are only two valid reasons you haven't done it yet. The first is you don't need the full-text capability, and the second is you didn't know it could be done.

In his method he creates a full-text search table (using fts4) and populating it with your data. You can use the "MATCH" keyword in your SQL to find the closest matches and even handy modifiers like "NEARBY", wildcards and token/prefixes in queries. For more detailed information, check out the SQLite documentation for a full guide.

0 comments voice your opinion now!
fulltext sqlite search fts4 table


ZetCode.com:
SQLite PHP tutorial
October 17, 2011 @ 12:12:48

If you're in the process of prototyping a site or just need a lightweight storage tool for your application, you might look into SQLite. Fortunately, PHP has direct support for it and this great tutorial from ZetCode.com will introduce you to some of the basic concepts you'll need to get working (it's a bit older, but still very useful).

This is a PHP programming tutorial for the SQLite database. It covers the basics of SQLite programming with PHP language. There are two ways to code PHP scripts with SQLite library. We can use procedural functions or OOP objects and methods. In this tutorial, we use the classical procedural style. You might also want to check the PHP tutorial or SQLite tutorial on ZetCode.

They go through the basic installation (on a linux platform, but easily adapted to others) including changes to your php.ini and the creation and use of a first sample database. You'll find the interface very similar to some of its other RDBMS cousins with a few exceptions. They show you the CRUD basics - creating records, reading the contents of a table, updating data already there and deleting records. There's also a simple form tutorial that takes a name and gender and does the inserts.

0 comments voice your opinion now!
sqlite tutorial crud form example


PHPBuilder.com:
Use PDO to Access Just About Any Database from PHP
April 25, 2011 @ 08:17:51

New on PHPBuilder.com there's a tutorial from Leidago Noabeb about using the PDO functionality that comes installed on many PHP platforms out there to access just about any database you might need to work work. This includes technology like MySQL, DB2, SQLite and PostgreSQL.

PHP Data Objects, or "PDO" as it is commonly known, is a lightweight database abstraction layer that is arguably the best, at least in terms of speed. A great deal of this speed is owing to the fact that the PDO extension was compiled with C/C++. The extension became available in PHP5, and as with any other database abstraction layer, its aim is to provide a uniform interface to access a variety of databases. This is also a way for developers to create portable code for a variety of platforms.

The tutorial shows you how to find the enabled PDO connection types for your installation (and where to go if you have access to turn more on or off). They show an example connection - in this case, to a MySQL database - and how to run a query or two using this new resource.

0 comments voice your opinion now!
pdo access database tutorial mysql sqlite postgresql


Johannes Schluter's Blog:
Changes in PHP trunk No more extension for sqlite version 2
November 22, 2010 @ 13:49:05

Johannes Schluter has a quick new post to his blog today talking about parts of the sqllite extension that will be dropped from the core - the current sqlite_* methods and the pdo_sqlite driver.

The issue there is that this depends on the SQLite 2 library which isn't supported by upstream anymore for a few years. It was a logical step therefore to remove this extension from PHP trunk. The support for the sqlite3 extension and the PDO_sqlite driver (same link as above, read it carefully), which use version 3 of the library, are continued.

The change probably won't be happening in any of the PHP 5.3.x releases but should becoming in PHP 5.4 so, as he advises, you might need to rebuild your database file and change your application to correct things for the changes.

1 comment voice your opinion now!
change trunk sqlite remove pdosqlite extension sqlite3


NETTUTS.com:
Creating a Web Poll with PHP
September 03, 2010 @ 08:26:42

On NETTUTS.com today there's an intermediate tutorial showing you how to create a simple polling system for your site - complete with a database backend and a CSS styled results view.

Polls are nearly ubiquitous on the web today, and there are plenty of services that will provide a drop-in poll for you. But what if you want to write one yourself? This tutorial will take you through the steps to create a simple PHP-based poll, including database setup, vote processing, and displaying the poll.

They include all of the code and markup you'll need ready for cut & paste - the SQL for the database backend (they chose SQLite), the HTML for the question and answer sides and the CSS to style them both. No javascript is needed to make the example work. There's even some process flows to help you understand the paths the application can take.

0 comments voice your opinion now!
poll tutorial sqlite css database


FWebDe Blog:
Use SQLite For Your Next PHP Project
August 12, 2010 @ 09:19:20

On the FWebDe blog there's a recent post from Eric Bannatyne about using SQLite in your next project.

SQLite is one of those awesome pieces of software known for its "liteness". It is, as you can guess from the name, a database designed to have as small a footprint as possible. SQLite is a very popular database, in fact, it is believed to be the most widely deployed SQL database engine in the world.

He gives some reasons why to choose this database tool and introduces you to some of the basics - creating a database, connecting to it from PHP and running a query. He ties this all together in a complete example of connecting to the database and inserting post information into a table.

0 comments voice your opinion now!
sqlite database tutorial pdo


Hasin Hayer's Blog:
Converting standard wordpress into a SQLite powered multi user blogging platform
September 22, 2009 @ 12:51:52

Hasin Hayder has posted about a method for turning a normal WordPress installation into a muilt-user blogging system backed by an SQLite database.

Wordpress is one of the very popular blogging platform which is not only free but also released as a open source project. officially wordpress runs only on mysql. so if you want to run it with SQLite, you will not find any official support for that.

He has five steps in his process for converting the backend away from MySQL and over to SQLite:

  • Add a wildcard to your DNS setup for the hostname you're using
  • Install WordPress
  • Install PDO for WordPress
  • Create the directory where the user databases will exist
  • Change the database configuration to write to a SQLite database file based on the hostname (which is what the DNS wildcard makes easier)
0 comments voice your opinion now!
convert wordpress sqlite tutorial pdo


Mark Karpeles' Blog:
SVN error 200030 - It's PHP's fault!
August 06, 2009 @ 09:06:56

Mark Karpeles found a problem when he updated his Subversion install to the latest in the 1.6.x series - an XML error about opening the filesystem.

After some searches I found someone who had the same problem, and fixed it. Basically the problem is due to the SQLite version embed into PHP 5.2.x. PHP includes SQLite 3.3.7 while SVN will usually depend on 3.6.15 (or whatever you have on your system).

There's three solutions to the issue - disable PHP, update SQLite or create a new repository with the "-pre-1.6-compatible" flag to make it all play nicely together.

0 comments voice your opinion now!
svn sqlite version fix


Greg Beaver's Blog:
Code Coverage Reporting using PEAR, PEAR2, phar, and sqlite3
April 14, 2009 @ 12:08:08

Greg Beaver has a new post reporting on his latest efforts to improve the Pyrus PEAR installer and to make it a more strong, stable and robust end result.

One of the problems I found when designing the new code for PEAR 1.4.0 (back in the day) was that it was very difficult to determine whether changes would break things. The main problem revolves around the colossal size of the test suite. [...] This is a real problem when trying to develop with any kind of flow. If, after every change, one needs to sit through 35 minutes of tests, one will never develop anything of substance.

What he wanted was an application that could detect only the files modified and tests those with the results put into the code coverage report. To fill the need, he created test-modified.php to run just the phpt tests needed.

0 comments voice your opinion now!
codecoverage report phpt unittest pear phar sqlite custom



Community Events





Don't see your event here?
Let us know!


unittest refactor podcast install configure laravel code list release opinion developer testing interview framework community series threedevsandamaybe introduction language symfony2

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework