php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: larry dot diffey at gmail dot com
New email:
PHP Version: OS:

 

 [2010-07-15 20:39 UTC] larry dot diffey at gmail dot com
Description:
------------
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");
php_fetch_array($qry);

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.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-16 07:55 UTC] scottmac@php.net
-Status: Open +Status: Bogus
 [2010-07-16 07:55 UTC] scottmac@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 08:01:29 2024 UTC