Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: PHP version of ASP datagrid?

date posted 21st May 2007 12:05

This is very simple, just have a selection of checkboxs all named example
"uid" with the value of each row id as the value.
When submitted only the checked ids will be passed as a comma delimited
string "1,5,56,300,459,etc" and you can split the data and create a SQL
string to alter your database based on the id's passed.

For example in ASP you can simply do

for i=1 to Request.form("uid").count
theSQL = theSQL & "id=" & clng(Request.form("images")(i)) & " OR "
next

in PHP you can probably do something very similar.


Regards
Sam Morgan
WiredEyes Media / ServWise Advanced Hosting
tel (Uk): +44 (0)20 7100 2178
tel (Italy): +39 070 773 6543
web : www.wiredeyes.com / www.servwise.com
----
umop ap!sdn w,! aw dlaH


> -----Original Message-----
> From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of
> Duncan Glendinning
> Sent: Monday, May 21, 2007 12:14 PM
> To: FN-FORUM / [EMAIL REMOVED]
> Subject: FN-FORUM: PHP version of ASP datagrid?
>
>
> Good Morning all!
>
> Right, all of the admin features I build to edit properties, products,
> courses, etc.. always are based on paginated listings which can be
> filtered by a number of parameters, which then affects which rows are
> returned by the MySQL query.
>
> What I have always wondered, is how can you implement something
> similar to most email clients, where you can tick ant number of rows
> and then select an action from a drop-down and that action is applied
> to all the rows?
>
> I know ASP has something called datagrid, and someone has brought out
> phpdatagrid, but it costs, and to be honest I would rather learn how
> to build it myself.
>
> An example of why this could be so useful. If you have a list of
> pupils whose progress in a course you wish to update in bulk, then you
> could select how wever many have passed by ticking the box on their
> row, and then selecting "Passed" from the drop down, which would then
> update all of their MySQL entries to passed.
>
> I look forward to hearing from you with hints, tips, and ideally a
> couple of links to tutorials I can work my way through.
>
> Many thanks,
>
> Duncan
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>



Messages by Day
May 31st 2007
May 30th 2007
May 29th 2007
May 28th 2007
May 27th 2007
May 26th 2007
May 25th 2007
May 24th 2007
May 23rd 2007
May 22nd 2007
May 21st 2007
May 20th 2007
May 19th 2007
May 18th 2007
May 17th 2007
May 16th 2007
May 15th 2007
May 14th 2007
May 13th 2007
May 12th 2007
May 11th 2007
May 10th 2007
May 9th 2007
May 8th 2007
May 7th 2007
May 6th 2007
May 5th 2007
May 4th 2007
May 3rd 2007
May 2nd 2007
May 1st 2007


Messages by Month
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000