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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 - 7 = ?
Subscribe to this entry?

 
 [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: Fri Mar 29 11:01:29 2024 UTC