Using pclib database layer
(Look at the source code for short tutorial)TEST-1 db->query()/db->fetch()
HTML table generated by db->export() function:ID | NAME | SURNAME | BIRTHDATE | PROFESSION | MONEY |
---|---|---|---|---|---|
3 | Linus | Torvalds | 1969-12-28 00:00:00 | bigboss | 10000000 |
4 | John | Carmack | 1970-08-20 00:00:00 | programmer | 1000000000 |
5 | Brian | Kernighan | 1942-10-20 00:00:00 | programmer | 1000 |
6 | Dennis | Ritchie | 1941-04-03 00:00:00 | programmer | 1000 |
TEST-2 db->select*()
ID | NAME | SURNAME | BIRTHDATE | PROFESSION | MONEY |
---|---|---|---|---|---|
1 | Bill | Gates | 1955-11-28 00:00:00 | bigboss | 1000000000000 |
2 | Steve | Jobs | 1955-02-24 00:00:00 | bigboss | 100000000 |
3 | Linus | Torvalds | 1969-12-28 00:00:00 | bigboss | 10000000 |
4 | John | Carmack | 1970-08-20 00:00:00 | programmer | 1000000000 |
5 | Brian | Kernighan | 1942-10-20 00:00:00 | programmer | 1000 |
6 | Dennis | Ritchie | 1941-04-03 00:00:00 | programmer | 1000 |
Show last executed query
select * from PEOPLE where ID='1' and MONEY>'1000'select * from A where X='Xval' and Y='Yval'
select * from A where X='Xval' and Y='Yval'
select * from A where X='Xval' and Y='Yval'
select * from A where X='0' and Y='0'
select * from A where X='100' and Y='200'
select * from A where X='100' and Y='20'
select * from A where X in ('Xval','Yval')
select * from A where X in ('Xval','Yval')
select * from A where X in (0,0)
select * from A where X in (100,200)
select * from A where X='Xval'
select * from A where X='Xval'
select * from A where X='Xval' and Y='Yval'
INSERT INTO A (`X`,`Y`) VALUES ('Xval','Yval')
UPDATE A set `X`='Xval',`Y`='Yval' WHERE `X`='Xval' AND `Y`='Yval'
DELETE FROM A WHERE `X`='Xval' AND `Y`='Yval'
Source code: db.php
Elapsed time: 3.1 ms