PHP Classes

LINQ In PHP: Query arrays with a SQL-like syntax using LINQ

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 75%Total: 4,007 All time: 783 This week: 455Up
Version License PHP version Categories
linq-in-php 1.6.0Artistic License5.3PHP 5, Databases, Data types
Description 

Author

This class can be used to query arrays,html,xml or json file with a SQL-like syntax using LINQ.

It takes an array as parameter and can perform several types of queries using an SQL-like syntax as if the array was a relational database.

Currently it supports performing SELECT , DELETE, INSERT and UPDATE queries.

Example SELECT Queries:
========================
- SELECT *FROM myArray ORDER BY key DESC,value ASC,
- SELECT key,value FROM myArray WHERE value='100',
- SELECT * FROM json_file(my_json_file.txt),
- SELECT * FROM xml_file(http://tufyta.com/feed/).channel.item WHERE title LIKE '%linq%'
- SELECT *FROM html_file(http://tufyta.com).div WHERE class='post_title'
- SELECT *FROM text_file(data.txt) WHERE in_array('.line.',array(1,2,3,4,5,6,))
-SELECT * FROM dir_files(doc).files WHERE name LIKE '%D3Linq%'
- SELECT *FROM myArray.subitems WHERE name='Tufan'
- SELECT DISTINCT surname FROM personnels ORDER BY surname DESC

Example INSERT Queries:
========================
- INSERT INTO myArray (name,surname) VALUES ('Tufan','YILDIRIM')
- INSERT INTO myArray.subitems ('known_langs') VALUES ('PHP,C#,C++')

Example UPDATE Queries:
========================
- UPDATE myArray SET name='TUFAN' WHERE surname='YILDIRIM',
- UPDATE myarray.subitems SET known_lags='PHP,C#'

Example DELETE Queries:
========================
- DELETE FROM myArray WHERE name='Tufan'
- DELETE FROM myArray.subistems WHERE known_language LIKE '%PHP%'

Innovation Award
PHP Programming Innovation award winner
January 2010
Winner


Prize: One copy of the Zend Studio
LINQ is a framework created by Microsoft for querying data sets that may be stored for instance array variables, XML documents or JSON structures. It can use an SQL-like dialect for querying data.

This class provides a pure PHP implementation of the LINQ data querying framework.

Manuel Lemos
Picture of Tufan Baris YILDIRIM
  Performance   Level  
Innovation award
Innovation award
Nominee: 5x

Winner: 4x

 

Screenshots (1)  
  • self_debugger.png
  Files folder image Files (12)  
File Role Description
Files folder imageExamples (3 files)
Files folder imageFunc_Example (4 files)
Plain text file D3Linq.php Class D3Linq Class File
Accessible without login Plain text file debug_example.php Example Activating Self Debugger on error
Accessible without login HTML file Doc Doc. Change Log
Accessible without login Plain text file linq_test.php Example Speed Test in big array.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadlinq-in-php-2010-09-05.zip 62KB
Downloadlinq-in-php-2010-09-05.tar.gz 59KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
DB Engine Download .zip .tar.gz db_engine/tools/d3grid.php need for display linq result in a html table. Optional
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,007
This week:0
All time:783
This week:455Up
User Ratings User Comments (10)
 All time
Utility:96%StarStarStarStarStar
Consistency:92%StarStarStarStarStar
Documentation:86%StarStarStarStarStar
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:75%StarStarStarStar
Rank:71
 
Excellent upload, super, super, thanks a lot! All I wish now...
10 years ago (Melanie Wehowski)
77%StarStarStarStar
This is an incrediblely useful class for manipulating two-dim...
12 years ago (Eric Perez)
80%StarStarStarStarStar
Faydalı ve çok güzel bir çalışma tebrik ederim.
14 years ago (Ali)
80%StarStarStarStarStar
PERRRRFECT!!!!
14 years ago (adrian)
90%StarStarStarStarStar
Wery Good Man !
15 years ago (Savas YILDIRIM)
90%StarStarStarStarStar
Perfect class
15 years ago (Kemal BALABAN)
90%StarStarStarStarStar
tnks
15 years ago (fatih agac)
90%StarStarStarStarStar
really brilliant work.
15 years ago (alper)
90%StarStarStarStarStar
Extraordinary work ! I really like it, and it's so useful too.
15 years ago (ARGETECH)
90%StarStarStarStarStar
That's a revolution at PHP
15 years ago (Ridvan KARATAS)
90%StarStarStarStarStar