Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:41:40+00:00 2026-06-17T08:41:40+00:00

I am using cakephp 1.3 and i want to search a record which contain

  • 0

I am using cakephp 1.3 and i want to search a record which contain / in string.
i have passed parameter as below.
Search params are as below.

Array
(
    [controller] => indents
    [action] => admin_index
    [named] => Array
        (
            [pr_no_data] => pr
        )

    [pass] => Array
        (
            [0] => no
            [1] => dip
            [2] => 002
        )

    [prefix] => admin
    [admin] => 1
    [plugin] => 
    [form] => Array
        (
        )

    [url] => Array
        (
            [url] => admin/indents/index/pr_no_data:pr/no/dip/002
        )

    [isAjax] => 
)

as you all can see my url params contain admin/indents/index/pr_no_data:pr/no/dip/002 and now i want to search pr_no as defined in url.
How can i do this.?
because search for / record passing values as passed parameter.
Please help me.

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:41:41+00:00Added an answer on June 17, 2026 at 8:41 am

    As you can see in your array, CakePHP sees part of the data as passed parameters. In the pr_no_data named variable, you see it references pr as it’s value.

    [named] => Array
       (
           [pr_no_data] => pr
       )
    

    However, the remaining character string in the data is recognized as passed parameters because of the slashes. So it is reading them as part of the URL, not the pr_no_data variable.

     [pass] => Array
        (
            [0] => no
            [1] => dip
            [2] => 002
        )
    

    What you need to look at is how you generate that variable before it is added to the URL. Perhaps you can change it to a pipe | separated list or a comma , separated list so it does not interfere with the URL and confuse cakephp.

    pr|no|dip|002
    pr,no,dip,002
    

    Once cakephp receives the data, you can then convert them back to slashes if needed:

    $passed = preg_replace('/,/', '/', $this->params['named']['pr_no_data']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using cakephp 2. I have a model called pupils which $hasMany = array('PupilAction', 'TransientAction',
I have using cakephp and I want to obscure all numbers which is more
Using cakephp, I have a generic address table, which I want to link to
I am using CakePHP and want to create a URL to a controller/view without
Im using cakephp 2.0 and i have data submitted that i want to cleanup,
I'm using cakephp and I want the login view for the controller 'users' to
I have a site set up using CakePHP and MySQL and I want to
I am using cakePHP framework to build a website in which I want to
I'm using cakephp 2.1 just fine; I want to use jquery to have my
I'm using CakePHP search plugin http://cakedc.com/downloads/view/cakephp_search_plugin and want to make an arg to search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.