Re: database table locking across supported database
Hi, On Sun, Jun 29, 2014 at 11:01 AM, Prashant Shah wrote: > Hi, > > http://docs.doctrine-project.org/en/2.0.x/reference/transactions-and-concurrency.html > Check the Locking support section. There are many such use cases within my application that I need locking at database level. Regards. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: database table locking across supported database
Hi, On Wed, Jun 18, 2014 at 1:34 PM, José Lorenzo wrote: > Why do you want to lock it? let assume a database schema : id (primary, auto inc), receipt_number (varchar), amount (float) The "receipt_number" is to be incremented on every insert. This is not the id field which is auto incremented by the database itself. Its a different field from 'id' that can have numbers, characters, special characters, etc. The receipt_number has to be incremented in the code and cannot be done automatically for various other reasons. Now let say I want to insert a row, I will read the last receipt_number, increment it and write the new row back to database. At the same time another user is also inserting a row, he read the last entry receipt_number which is the same as I read since I have not yet written the new row. He will also increment to the same value and write it back. This will lead to a conflict. That is why I need a reliable way to lock the table so that no one else can read/write to the table until I have finished with reading and writing the new row as one atomic operation. http://docs.doctrine-project.org/en/2.0.x/reference/transactions-and-concurrency.html Regards. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
what is the current method to use Jgraph with cakephp 2.x
Hi, How is Jpgraph supposed to integrate with cakephp? In the controller or the view do i place the code to construct the jpgraph ? The old way is to display a jgraph with an image which is a call to another view but that way doesnt appear to work with currect cakephp. The problem is that jpgraph examples for cakephp is for older versions and there is no update for jpgraph with newer cakephp versions that I can find. The only solution I have found is from the stackoverflow post. The jpgraph does work if I place the graph code in the controller like the hack solution but that isnt how it is supposed to work according to the docs. I didnt get the requestHandler as explained in the stackoverflow post to have any effect but anyway I cant find anything in the cakephp docs. http://bakery.cakephp.org/articles/cguyer/2007/12/26/using-jpgraph http://stackoverflow.com/questions/9936890/cakephp-2-0-jpgraph ?php App::import('Vendor', 'Jpgraphs/jpgraph'); App::import('Vendor', 'Jpgraphs/jpgraph_line'); $ydata = array(11,11,11); // Create the graph. $graph = new Graph(350,250); $graph->SetScale("textlin"); $graph->img->SetMargin(30,90,40,50); $graph->xaxis->SetFont(FF_FONT1,FS_BOLD); $graph->title->Set("Example 1.1 same y-values"); // Create the linear plot $lineplot=new LinePlot($ydata); $lineplot->SetLegend("Test 1"); $lineplot->SetColor("blue"); $lineplot->SetWeight(5); // Add the plot to the graph $graph->Add($lineplot); // Display the graph $graph->Stroke(); ?> // ]]> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
what is the currect method to disolay jgraph with cakephp
Hi, How is Jpgraph supposed to integrate with cakephp? In the controller or the view do i place the code to construct the jpgraph ? The old way is to display a jgraph with an image which is a call to another view but that way doesnt appear to work with currect cakephp. The problem is that jpgraph examples for cakephp is for older versions and there is no update for jpgraph with newer cakephp versions that I can find. The only solution I have found is from the stackoverflow post. The jpgraph does work if I place the graph code in the controller like the hack solution but that isnt how it is supposed to work according to the docs. I didnt get the requestHandler as explained in the stackoverflow post to have any effect but anyway I cant find anything in the cakephp docs. http://bakery.cakephp.org/articles/cguyer/2007/12/26/using-jpgraph http://stackoverflow.com/questions/9936890/cakephp-2-0-jpgraph ?php App::import('Vendor', 'Jpgraphs/jpgraph'); App::import('Vendor', 'Jpgraphs/jpgraph_line'); $ydata = array(11,11,11); // Create the graph. $graph = new Graph(350,250); $graph->SetScale("textlin"); $graph->img->SetMargin(30,90,40,50); $graph->xaxis->SetFont(FF_FONT1,FS_BOLD); $graph->title->Set("Example 1.1 same y-values"); // Create the linear plot $lineplot=new LinePlot($ydata); $lineplot->SetLegend("Test 1"); $lineplot->SetColor("blue"); $lineplot->SetWeight(5); // Add the plot to the graph $graph->Add($lineplot); // Display the graph $graph->Stroke(); ?> // ]]> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.