| | |
query string
Please support our Ruby advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2006
Posts: 44
Reputation:
Solved Threads: 0
can anybody tell me how to get the values from querystring.
thanx in advance to all..
thanx in advance to all..
•
•
•
•
can anybody tell me how to get the values from querystring.
thanx in advance to all..
ruby Syntax (Toggle Plain Text)
params[:param_name]
So say for example you're using pagination and you want the page_number param
list?page_number=1: ruby Syntax (Toggle Plain Text)
params[:page_number]
Note to self... pocket cup
•
•
Join Date: Nov 2006
Posts: 44
Reputation:
Solved Threads: 0
thanx pty for quick reply,
but if i have suppose 7 parameters in query string and i want to access the value for all 7 parameters in one go, how can i do that..
but if i have suppose 7 parameters in query string and i want to access the value for all 7 parameters in one go, how can i do that..
•
•
•
•
thanx pty for quick reply,
but if i have suppose 7 parameters in query string and i want to access the value for all 7 parameters in one go, how can i do that..
{"action"=>"list", "filter"=>"closed", "controller"=>"issue"}. If you want to iterate through them for example use: ruby Syntax (Toggle Plain Text)
params.each do |key, value| #do something fancy! end
Note to self... pocket cup
•
•
Join Date: Nov 2006
Posts: 44
Reputation:
Solved Threads: 0
hi pty,
is there any special function to retrive the complete query string path,i have read from manual that this function is used to retrieve complete string,
ENV['QUERY_STRING'],but i am not able to get it working.
is there any special function to retrive the complete query string path,i have read from manual that this function is used to retrieve complete string,
ENV['QUERY_STRING'],but i am not able to get it working.
•
•
Join Date: Nov 2006
Posts: 44
Reputation:
Solved Threads: 0
thanx gary for your reply but i want to know that ,do i need to install or include some file to get it working as its not working if i only add this line of code only.
Try using controller.env['QUERY_STRING'], where controller is the name of the controller where you are using this.
Last edited by Gary King; May 23rd, 2007 at 1:40 pm.
![]() |
Similar Threads
- Removing Query Strings (ASP.NET)
- Generate sql string to query MySQL DB ? (PHP)
- encrypt and decrypt query string (VB.NET)
- Dynamic query string (Search Engine Optimization)
- Coverting a string to a byte array (Visual Basic 4 / 5 / 6)
Other Threads in the Ruby Forum
- Previous Thread: execute ruby
- Next Thread: need help with learning ruby
| Thread Tools | Search this Thread |





