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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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 05:01:30 2024 UTC