435815 Run MySQL Queries Using XML In PHP

I need a custom PHP script that can duplicate the basic functions of MySQL using XML files. The purpose is to test MySQL queries on servers that do not have MySQL installed.

The script should use PHP's built-in XML Parser to read and update files holding the table data. Each table should be stored in a separate XML file. Another file can be used to hold the table schema, if that would be easier.

Each database should be stored in a separate folder, which holds all of the XML and other files for that database.

More advanced features, such as user privileges and indexes are not necessary. The main purpose is just to run queries to test them.

The script should read, interpret, and execute the following components of MySQL queries:

- Select statements (column names and * wildcards)

- Update statements

- Insert statements

- Replace statements

- Delete statements

- Where clauses (with AND, OR, NOT, IN, =, <, >, <=, >=, !=, <> operators)

- Order by clauses (ASC or DESC)

- Group by clauses

- Table joins (left, right, inner, outer)

- Create database

- Drop database

- Create table

- Alter table

- Drop table

- auto_increment

The Alter Table queries should be able to update a table's schema. Queries to add indexes and other features not used in this script should be ignored, but not return errors.

The script should be able to run the following MySQL functions within queries. In most cases, a similar function is built into PHP so it can simply use PHP to get the result.

- AVG()

- SUM()


- Basic math such as: Update table set num=num+1;

- DATE()

- NOW()

- TIME()

The script should have the following functions that simulate the MySQL functions in PHP.

run_query() - Simulates the mysql_query() function in PHP. Should return a resource or boolean, depending on the type of query.

choose_db() - Simulates mysql_select_db() to select the database. Since the script is just for testing, connecting and logging into the database is not necessary.

query_fetch_array() - Simulates mysql_fetch_array()

query_fetch_row() - Simulates mysql_fetch_row()

count_rows() - Simulates mysql_num_rows()

get_result() - Simulates mysql_result()

get_error() - Returns any obvious syntax errors on the last query submitted to the run_query() function.

I would need exclusive ownership and copyright of the code for this script. Please let me know if you have any questions or need any clarification.

Evner: Lidt af Hvert, MySQL, PHP, XML

Se mere: simply group returns, schema update, purpose of use cases, php main functions, php create table, php components, Mysql questions, in php, create table php, create mysql database using php, connecting to a mysql database, code for update in php, asc it, mysql data files, get math, xml parser, run, run and update, queries, php script create table

Om arbejdsgiveren:
( 11 bedømmelser ) Spotsylvania, United States

Projekt ID: #2181688

Tildelt til:



$250 USD in 4 dage
(469 bedømmelser)