# select where url param

**URL:** <https://discuss.rubyonrails.org/t/select-where-url-param/20169>\
**Category:** rubyonrails-talk\
**Created:** [November 7, 2007, 2:18pm UTC](https://discuss.rubyonrails.org/t/select-where-url-param/20169 "2007-11-07T14:18:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavri\_Fernandez](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gavri\_Fernandez](https://discuss.rubyonrails.org/u/Gavri_Fernandez)\
**Post date:** [November 7, 2007, 2:18pm UTC](https://discuss.rubyonrails.org/t/select-where-url-param/20169/1 "2007-11-07T14:18:23Z")

</div>

@product = Product.find\_by\_sql["SELECT \* FROM products WHERE category\_id = ?", params[:id]]
