- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
SELECT
CONCAT('<td align=center><input type=Checkbox name=del[] value=', t1.id, '>') AS 'X'
,CONCAT('<td align=center>', t1.id) AS '\#'
,CONCAT('<td align=center><a href=index.php?func=$func&ptab=$ptab&pid=$pid&id=', t1.id, '>', IF(t1.name<>'', t1.name, '<i>Pending...</i>'), '</a>') AS 'Transaction ID'
,CONCAT('<td><a href=index.php?func=user&id=', t2.id, '>', CONCAT(t2.fname, ' ', t2.lname), '</a>') AS 'User'
,CONCAT('<td align=center><a href=index.php?func=answers&ptab=order_id&pid=', t1.order_id, '>history</a>') AS 'Med'
,CONCAT('<td align=right>', t1.amt, ' ') AS 'Amount'
,CONCAT('<td align=center style=\"font-size: 10px;\" title=\"', t1.data_ord, '\">', LEFT(t1.data_ord, 10)) AS 'Order date'
,CONCAT('<td align=center style=\"font-size: 10px;\">', IF(t1.data_pay, LEFT(t1.data_pay, 10), '<b>Not paid</b>')) AS 'Pay date'
,CONCAT('<td align=center style=\"font-size: 10px;\">', IF(t1.data_send, LEFT(t1.data_send, 10), '<b>Not sent</b>')) AS 'Send date'
,CONCAT('<td align=center><a href=index.php?func=items&ptab=$func&pid=', t1.id, '>', sum(t3.quant), ' Items</a>') AS '# items'
#,CONCAT('<td align=center><a href=index.php?func=answers&ptab=order_id&pid=', t1.order_id, '>', count(t7.id), ' answ</a>') AS '# answ'
,CONCAT('<td align=center>', CASE WHEN (t1.sv_type=2) THEN \"Waiting\" WHEN (t1.sv_type=-2) THEN \"<font color=FF0000><b>Rejected</b></font>\" WHEN (t1.sv_type=-1) THEN \"<font color=FF0000>Declined</font>\" WHEN (data_send AND track_num2 <> '') THEN \"<b>Re-Done</b>\" WHEN (data_send) THEN \"<b>Done</b>\" WHEN (t1.sv_type=1) THEN \"<font color=008080>Ready to ship</font>\" WHEN (data_pay) THEN \"<font color=008000>Approved</font>\" WHEN (t1.err > 0) THEN \"<font color=FF0000>Failed</font>\" ELSE \"<font color=808080>Pending</font>\" END) AS 'Status'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.doctor) AS 'D'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.bonus) AS 'B'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.err) AS 'Err'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.sv_type) AS 'S#'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.pay) AS 'PM'
,CONCAT('<td align=center style=\"font-size: 10px;\">', t1.partner) AS 'P'
,CONCAT('<td align=center style=\"font-size: 10px;\">', MID(t6.url, 8)) AS 'Shop'
,CONCAT('<tr><td colspan=19 style=\"font-size: 10px;\"><a target=\"_blank\" href=\"', t1.referer, '\"><b>URL Referrer</b>: ', LEFT(t1.referer, 150), '</a><tr><td colspan=19 bgcolor=55555>') AS ''
FROM $func t1
и т.д.
Такой вот sql-запрос с html разметкой. А вы говорите MVC :)
nur 17.03.2010 01:06 # +5.4
guest 17.03.2010 06:49 # +1.4
guest 17.03.2010 09:07 # +1.4
Упрощённая версия выглядела примерно так:
Oleg_quadro 17.03.2010 10:37 # −0.8
dzver 17.03.2010 11:36 # +6.6
I guess this code is old, probably 2000-2002.
HyperGeek 17.03.2010 12:24 # +2.4
guest 18.03.2010 00:31 # +1.2
guest 18.03.2010 11:08 # +1
klem4 17.03.2010 19:54 # +1
Death 18.03.2010 03:17 # 0
Предлогаю вообще все варианты сайта от <html> до </html> в базе держать, и вычитывать всю страничку по id )))))))
mrbig66 18.03.2010 10:48 # 0
guest 19.03.2010 12:12 # 0
guest 18.03.2010 12:41 # 0
guest 18.03.2010 14:21 # +0.4
deniamnet 18.03.2010 17:30 # −3.2
guest 19.03.2010 08:29 # +0.8
wwwguru 20.03.2010 04:22 # 0
guest 24.03.2010 17:40 # 0
awax 24.03.2010 17:43 # +0.2
наверное по большому счету стоило это запостить в SQL, но когда подумал об этом, было уже поздно.
guest 26.10.2012 18:03 # 0