The most efficient way database-wise would be to have a char(1)
database column that you populate with whatever the first letter of
the field you're using... that way it could be indexed and easily
counted. It would be slightly slower when saving data but (I assume)
much faster retrieving it.
If
Dave,
'conditions' => array('Profile.company LIKE' => $i . '%'),
http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html
Andras Kende
http://www.kende.com/
On Sep 3, 2010, at 5:49 PM, Dave Maharaj wrote:
> I have this query in the model
>
> $params = array(
> 'conditions' =>
You should use % instead of *
On Sep 3, 4:49 pm, "Dave Maharaj" wrote:
> I have this query in the model
>
> $params = array(
>
> 'conditions' => array(
>
> 'Profile.company LIKE' => $i.'*'),
>
> 'fields' => array(
>
> 'Profile.company',
>
> 'Profile.id'),
>
> 'contain' => false);
>
> $this->fin
Hello,
I'd like to have date fields that allow null values to default to a
null selection in the date/time menus when generating pages from the
admin scaffold. I found ticket 5702 that suggests a patch, but that's
for Cake 1.2, I wasn't able to work out a fix for 1.3. Has anyone
worked this out or
I have this query in the model
$params = array(
'conditions' => array(
'Profile.company LIKE' => $i.'*'),
'fields' => array(
'Profile.company',
'Profile.id'),
'contain' => false);
$this->find('first', $params);
Where $i is a single letter so I am trying to get the first record sta
Hi
I have use openId component from cakebaker (http://code.42dh.com/
openid/) and when I'm trying to authentificate fom google I'm getting
an errors:
handleOpenIDResponse
Notice (8): Undefined variable: sregContents [APP\controllers
\users_controller.php, line 229]
Auth_OpenID_FailureResponse Ob
Sorry , my first thought would be to do a looping find->first of each letter
and so if it found a record starting with A set that link true, if nothing
for B then just the letter no link and co on...
The only problem I see is 26 queries just to build the paging links.
Other ideas?
Tha
Has anyone created, thought of , started on the idea of an alphabetical
character paging system?
So rather than 1 | 2 | 3 it spits out A |B |C?
The ABC part seems rather simple just getting the letters to be links if
there are records for that letter seems to be the real issue. Any ideas on
a self written crawler
basically it collects all links and puts them into two arrays
a worklist and a "all links" list
after a while there are no new links so the worklist empties itself
as soon as its empty the crawler is done
On 3 Sep., 21:25, Sam wrote:
> Just curious,
> What did you use to
put something like
$("#itemlist").load("/items/index/page:$page #itemlist"); into your
delete function
On 2 Sep., 16:36, "Mariano C." wrote:
> Suppose to have 3 page, I delete an object from page 2, so I would
> take the first element from page 3 and use it as last element of page
> 2, and so on.
Dear friend,
A good news for you! I bought a laptop from Frioffere. Luckily, I was
one of their first 100 customers that day, so they sold it to me at
half price. Only 5 days later, I received my laptop. It is really
high-quality.
Same products, much lower prices! Share my happiness quickly. Come t
Just curious,
What did you use to crawl the urls?
On Sep 3, 8:09 am, euromark wrote:
> juhuu
> at least the crawler works now
> after a few minutes he found all 3500 public urls
>
> the testsuite then iterates over this array and performs some basic
> tests
> it seems all 3500 pages dont produce
You can export to csv directly from excel.
http://vegdave.wordpress.com/2007/05/19/import-a-csv-file-to-mysql-via-phpmyadmin/
On Sep 3, 2:11 pm, Muthuvel Subramani wrote:
> hello I am new to cakephp.. i need to import files from excel to mysql
> database.. so for this i need to upload the excel f
hello I am new to cakephp.. i need to import files from excel to mysql
database.. so for this i need to upload the excel file...
after uploading i need to convert excel to csv file..
after converting to csv, i need to import csv file to mysql..
how should i approach for this scenario..
thanks..
Ch
You could probably check $this->Session for that, although I'm not
sure, offhand, what to look for.
On Fri, Sep 3, 2010 at 10:10 AM, Ernesto wrote:
> Hello.
>
> is there any way to determine if the current page is loaded by a
> controller::flash() call?
>
> i'm working in the controller::beforeRe
On Fri, Sep 3, 2010 at 6:35 AM, Mariano C. wrote:
> Yes, this is what I do actually.
> collection() function create my paginated list, after object removing
> I recall collection() function but this display first page of list,
> even if during deleting process I was at page 3.
Create the link in
Hi there.
I'm starting with a project which will need the use of ACL to control
permissions.
These are the tables involved in permissions:
Users (a user always will belong to a group)
Groups
Operations
Permissions will be established only between Groups and Operations
like: Group 1 are granted
Hello.
is there any way to determine if the current page is loaded by a
controller::flash() call?
i'm working in the controller::beforeRender().
Thx
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message becau
if it is not passed this part of the code in your action is NOT
REACHED
try
die('XYZ')
right in front of it
you will see that it is probably not even invoked
maybe some "return" in front of it?
On 3 Sep., 14:10, Richard wrote:
> Hello Anja,
>
> I also did that, returns also 'Undefined variab
juhuu
at least the crawler works now
after a few minutes he found all 3500 public urls
the testsuite then iterates over this array and performs some basic
tests
it seems all 3500 pages dont produce any fatal errors, errors,
warnings or notices :)
not sure how to test the backend (user, admin rout
Hello Anja,
I also did that, returns also 'Undefined variable'.
However I found a way, I added the following function to the
controller:
function beforeRender() {
parent::beforeRender();
$this->set('categories', $this->Category->find('all',
array('recursive'=>0)));
}
This works now as exp
Yes, this is what I do actually.
collection() function create my paginated list, after object removing
I recall collection() function but this display first page of list,
even if during deleting process I was at page 3.
On 3 Set, 06:22, Miloš Vučinić wrote:
> I think you should refresh your view
And how about
var_dump($categories);
In the view?
Anja
-Ursprüngliche Nachricht-
Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag
von Richard
Gesendet: Freitag, 3. September 2010 09:25
An: CakePHP
Betreff: Re: Undefined variable in view
Hello Milos, thanks
ok i looked in to this a bit more
this only happens when I'm not in debug mode
and this is becous in the error handling function fron debugger there
is this:
if (error_reporting() == 0 || $code === 2048 || $code === 8192) {
return;
}
and in the normal production error handling:
if ($code ===
our application gets bigger and bigger
every time we change a component we make sure the test cases for it
pass
but often times there might be some unforeseen consequences for the
output in the views.
i was wondering how this could me automated
ideas:
- level 1: build a crawler and index all avai
Hello,
You can call a model function from a component.
Here's a way to do it:
-
class MyComponent
{
private $controller;
public function initialize(&$controller)
{
$this->controller = $controller;
}
public fu
Hello Milos, thanks for you reply! If I define the variable in the
controller as follows it states again that it's undefined in the view.
$this->set('categories', 'TestValue');
When I echo the variable in the controller everything looks alright:
var_dump($this->viewVars['categories']);
However
27 matches
Mail list logo