What does this have to do with CakePHP?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
cake
On Thu, Mar 10, 2011 at 12:27 PM, chris...@yahoo.com wrote:
> Thank you for your response Sam,...
> In fact I did that,... another version to attempt... but now I'm not
> getting search results, but the page is clean on URL bar,... and yes
> its a urlencoded space %20
>
> here is what I have...
>
Thank you for your response Sam,...
In fact I did that,... another version to attempt... but now I'm not
getting search results, but the page is clean on URL bar,... and yes
its a urlencoded space %20
here is what I have...
function search($name = null)
{
if(!empty($this->data))
{
What error are you getting? %20 is just a urlencoded space... it isn't an
error.
If you want to replace it with a space then just do your str_replace on your
$url var right before "$this->redirect($url);".
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Ch
> That should get you going.
>
> K
@ Krissy, indeed it will. Thank you very much for taking the time.
Much appreciated. I'll get stuck into this this evening :)
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http
; $selected
),false);
else:
$output .= $letter;
That should get you going.
K
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of MeatSandwich
Sent: Friday, February 25, 2011 8:2
y, February 25, 2011 1:29 PM
To: CakePHP
Subject: Re: Search function
@Krissy Masters
instead of 25 single queries you could probably use a "group by"
statement and a single query :)
but nice idea, though
On 25 Feb., 15:43, MeatSandwich
wrote:
> Hey acl68, thanks for that, de
@Krissy Masters
instead of 25 single queries you could probably use a "group by"
statement and a single query :)
but nice idea, though
On 25 Feb., 15:43, MeatSandwich
wrote:
> Hey acl68, thanks for that, definitely does point me in the right
> direction. I need to go off and brush up a bit on my
Hey acl68, thanks for that, definitely does point me in the right
direction. I need to go off and brush up a bit on my javascript but
hopefully what you've given me will do the job.
thanks
On Feb 25, 1:58 pm, acl68 wrote:
> Hi Sandwich,
>
> I did something simliar like you want to do with the
Hi Sandwich,
I did something simliar like you want to do with the checkboxes with a drop-
down list. I didn't use the searchable-behaviour-for-cakephp but used AJAX
instead.
On top of my search from ctp I includ a JavaScript file:
In my search form I have my dropdown:
echo $this->Form->input('
Hi Krissy, that sounds absolutely perfect for the alphabet part of
what I want to do, thank you :)
Sorry for being such a noob but could you give me a bit more detail
about how to use this code. Does that all go into the users_controller
at the end of the add new user action? There are some things
For the Alphabet I made my own custom plugin function that just runs thru
the alphabet and does a query to find each letter. My table has search_group
field which saves the first letter upper / lowercase you decide of whatever
field the alphabet is for (name, business whatever) creates links if a
l
Good point!
Will look into it, but when I do a search now if I type in Mary or mary I
get the same results.
What would you suggest?
Dave
-Original Message-
From: John Andersen [mailto:j.andersen...@gmail.com]
Sent: August-14-09 2:45 AM
To: CakePHP
Subject: Re: Search function
Hi
$q = $this->find('all', $params);
>
> return $q;
>
> }
>
> Pass the $sql to the conditions and I end up with
> Post.title LIKE '%mary%' OR Post.description LIKE '%mary%' OR Post.title
> LIKE '%t
'%mary%' OR Post.description LIKE '%mary%' OR Post.title
LIKE '%test%' OR Post.description LIKE '%test%' OR Post.title LIKE
'%something%' OR Post.description LIKE '%something%'
-Original Message-
From: Luke [mailto:eik...@hotmail
;;"Post.title LIKE '%" .
> $value. "%' OR Post.description LIKE '%" . $value . "%' ";
>
>
>
> -Original Message-
> From: Luke [mailto:eik...@hotmail.com]
> Sent: August-12-09 11:43 AM
> To: CakePHP
> Subject: Re: S
ue. "%' OR
Post.description LIKE '%" . $value . "%' ";"Post.title LIKE '%" . $value.
"%' OR Post.description LIKE '%" . $value . "%' ";"Post.title LIKE '%" .
$value. "%' OR Post.description LIKE
Hi Dave,
Maybe not the nicest solution, but this should work:
$i=0; // This is your counter
// Now build your SQL String
$sql = "SELECT * FROM table";
foreach ($string as $key => $value)
{ $value = trim($value);
//strip white space befor and
ieve has to go but I cant figure out how to
add to the "Post.title LIKE '%" . $value . "%' OR Post.description LIKE '%"
. $value . "%' OR "; for each in a loop.
Ideas?
Thanks,
Dave
-Original Message-
From: John Andersen [mailto:j.andersen..
As soon as you have more than one word, for which to make a search for
within a text, it becomes more complex!
You can do as JamesF wrote, write the find, so each word is included
in a LIKE statement with OR between them.
You can also do as Smelly Eddie wrote, use tags instead, but the
problem is
better yet avvoid storing multiplee values in one field. Create a
reference table (tags) and add those values one per record. It. Will
save the code maintainers sanity down the road
On Aug 11, 11:32 pm, JamesF wrote:
> some fancy combos 'LIKE' and 'OR' in your find conditions array should
> get
some fancy combos 'LIKE' and 'OR' in your find conditions array should
get it done. The trick is formatting your array.
http://book.cakephp.org/view/74/Complex-Find-Conditions
On Aug 11, 8:55 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I am building a new search function for a input single f
You should build it into pagination.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-
s));
}
}
VIEW:
link($post['Post']['title'],'/posts/view/'.$post['Post']['id']);?>
SEARCH FORM on what ever page you want to search from:
create('Post',array(
Hi Dave,
I've just started looking into this myself. You could try these links;
http://www.assembla.com/wiki/show/searchable_behavior
http://thechaw.com/cakebook/source/plugins/searchable
http://bakery.cakephp.org/articles/view/search-feature-to-cakephp-blog-example
http://bakery.cakephp.org/ar
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
> de digital spaghetti
> Enviado el: Miércoles, 11 de Abril de 2007 05:23 a.m.
> Para: [EMAIL PROTECTED]
> Asunto: Re: Search function for application
>
> If its a search controller, rather
D] En nombre
de digital spaghetti
Enviado el: Miércoles, 11 de Abril de 2007 05:23 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Search function for application
If its a search controller, rather than in the users controller you
need to make sure you delare $uses at the top of the cont
In your controller
If (isset($this->data['User']['username']))
{
$user = $this->User->findByUsername($this->data['User']['username']);
}
If its a search controller, rather than in the users controller you
need to make sure you delare $uses at the top of the contoller
$uses = array('User');
28 matches
Mail list logo