MySQL Access from Shell

2010-10-18 Thread andres amaya diaz
Hi everybody, i have a web app running beautiful, i needed a MySQL
table to be updated everyday at 2 am so i created the table, the model
and a Shell, the shell retrieves a csv from an FTP server and then i
do a truncate to the model table and then a load data infile to load
the csv to the table/model.

The thing is that i got this error when i run the Shell:

PHP Warning:  SQL
Error: 1045: Access denied for user 'MYDBUSERNAME'@'localhost'
(using password: YES) in
/var/www/cdf/cake/libs/model/datasources/dbo_source.php on line 681

I tested and retested, and REtested the MySQL access, and actually the
web app is running correct using those same database configuration set
in the $default

Hope someone can help me ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


SELECT ... FOR UPDATE

2010-10-06 Thread andres amaya diaz
Hi, hope you can help me with a SELECT .. FOR UPDATE problem.

I have a web app that can be accessed by many users at the same time.
I have a table with a field wich has a counter on the next invoice
number. Lets call if invoicenumbers (this field cant be
auto_increment)
And then i have another table where i need to store the invoices data
Lets call it invoices

So lets see:
A user enters Save Invoice, i need to do a SELECT or FIND to the
invoicenumbers to get the next invoice number and then an UPDATE to
invoicenumbers to set the field counter = counter+1.
But maybe between the select and the update another user Saves another
Invoice wich will do the same (SELECT and the UPDATE) and that is a
remote posibility that they both get the same Invoice Number and then
both UPDATE the table increasing the counter by 2.

I hope i made myself clear.

Thanks in advance ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


rackspace cloud servers

2010-10-01 Thread andres amaya diaz
Has anybody on the group has any experience using rackspace cloud servers?
They look like a great alternative for a big web app deployment, even
for development or testing stages and i am looking for something like
this but first i wanted to see any reviews.

Here is the link:
http://www.rackspacecloud.com/cloud_hosting_products/servers

Thanks ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Best Server Configuration

2010-09-21 Thread andres amaya diaz
I am going to setup a dedicated server for a cakephp app, and i want
to know any good tips about the configuration.
- About php.ini best practices
- MySQL best configuration values
- What about Cache and performance?
- Is it really a good idea to setup a MySQL Cluster (to boost
performance), the app is intended to have 100,000 registered users,
maybe 50 to 100 users at the same time.

Thanks for any good advice?
aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


New cakePHP Social Network

2010-09-07 Thread andres amaya diaz
Hi, i just release a social network site made with cakePHP.
Can you give me some feed back on the site, the registration takes less than
a minute.

The website url is: http://2bpart.com

Thanks to all in advance ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Numbers to Words

2010-09-05 Thread andres amaya diaz
Hi, i was wondering if any one has done a numbers to words implementation in
cakePHP?

Thanks ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


iReport

2010-09-02 Thread andres amaya diaz
Hi, i am developing a web app, wich needs to have lots of pdf output
reports, so i was wondering if i can use iReport + jasper with cake with the
php-jru library.
For the ones who doesnt know ireport is a utility wich creates xml report
layouts, so if you need to chance margins, font type, etc ... you just
change the xml.
Does any one has donde this or something similar that can help me?

Thanks in advance ... aad

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


paginate + filters

2010-08-30 Thread andres amaya diaz
Hi, i have some filters in the index page of a listing, you can choose all
of the filters or just one, if i choose all of them they work fine but if i
only choose one it gives me a blank web page, here is the code:

/app/controllers/quotes_controller.php
function index() {
$this->Quote->recursive = 0;
$filters = array();

if(!empty($this->data['Quote']['desde']) &&
!empty($this->data['Quote']['hasta'])){
   $filters[1] = "Quote.fevento BETWEEN
'".$this->data['Quote']['desde']."' AND
'".$this->data['Quote']['hasta']."'";

}

if(!empty($this->data['Quote']['cliente_id'])){
$filters[2] = "Quote.cliente_id =
".$this->data['Quote']['cliente_id'];

$this->set('cliente_id', $this->data['Quote']['cliente_id']);
$this->set('autocliente', $this->data['Quote']['autocliente']);
}

if(empty($filters)) {
$filters[3] = "WEEK(Quote.fevento) = WEEK(NOW())";
$this->set('cliente_id', '');
$this->set('autocliente', '');
}

$filters[4] = "Quote.status = 0";

$this->set('quotes', $this->paginate(null, $filters));
}

/app/views/quotes/index.ctp



Paginator->sort('user_id');?>
Paginator->sort('cliente_id');?>
Paginator->sort('fentrega');?>
Paginator->sort('fevento');?>
Paginator->sort('frecoleccion');?>
Paginator->sort('solicitante');?>

Paginator->sort('created');?>






>

Html->link($quote['User']['username'],
array('controller' => 'users', 'action' => 'view', $quote['User']['id']));
?>


Html->link($quote['Cliente']['name'],
array('controller' => 'clientes', 'action' => 'view',
$quote['Cliente']['id'])); ?>

 
 
 
 
 
Time->format('d-m-Y',$quote['Quote']['created']); ?> 

Html->link(__('View', true), array('action' =>
'view', $quote['Quote']['id'])); ?>
Html->link(__('Edit', true), array('action' =>
'edit', $quote['Quote']['id'])); ?>
Html->link(__('Delete', true), array('action'
=> 'delete', $quote['Quote']['id']), null, sprintf(__('Are you sure you want
to delete # %s?', true), $quote['Quote']['id'])); ?>





Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en