|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52352 SQL Like Requests For Arrays
Submitted: 2010-07-15 20:39 UTC Modified: 2010-07-16 07:55 UTC
From: larry dot diffey at gmail dot com Assigned:
Status: Not a bug Package: *Database Functions
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2010-07-15 20:39 UTC] larry dot diffey at gmail dot com
It seems to me that it would make sense to at least apply the basic features of the SQL ANSI standard to php arrays that are NOT derived from another database.

To start with, it could support most of the features found within SELECT, INSERT, UPDATE and DELETE at least from a single table.

Support could be added later for joins and other complex SQL commands.

Mimic the mysql commands in php. Suppose an array exists called $array.
$qry = php_query("SELECT * FROM $array where name = "Bill");

I believe such a feature would add to the overall ease of use of php, especially for newer programmers and people coming from other languages that are already familiar with SQL commands.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-16 07:55 UTC]
-Status: Open +Status: Bogus
 [2010-07-16 07:55 UTC]
This works well with databases because they're indexed and have a completely 
different data model to variables. In PHP internally they're hash tables.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 19:01:25 2020 UTC