This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function accessRules() | |
| { | |
| return array( | |
| array('allow', // allow all users to perform 'index' and 'view' actions | |
| 'actions'=>array('index','view'), | |
| 'users'=>array('@'), | |
| ), | |
| array('allow', // allow authenticated user to perform 'create' and 'update' actions | |
| 'actions'=>array('create','update'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Primero en protectec/config/console.php | |
| <?php | |
| // This is the configuration for yiic console application. | |
| // Any writable CConsoleApplication properties can be configured here. | |
| return array( | |
| 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', | |
| 'name'=>'My Console Application', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| switch ($model->estado){ | |
| case 0: | |
| $classes = 'label label-success'; | |
| $model->estado ="Por asignar Usuario"; | |
| break; | |
| case 1: | |
| $classes = 'label label-info' ; | |
| $model->estado ="Por asignar Mer"; | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($mer) { | |
| print_r($mer[0][mer]); | |
| foreach ($mer as $it=>$a) { | |
| $arr[$it]= $mer[$it][mer]." ".$mer[$it][nivelelectoral]; | |
| } | |
| $options["class"] = 'span3'; // Le doy Clases de CSS a el Select Input | |
| $options["empty"] = 'Seleccione MER'; // Genero un EMPTY field. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php echo $form->datepickerRow($model, 'date_start',array('value'=>date('Y-m-d'),'prepend'=>'<i class="icon-calendar"></i>','options' => array( | |
| 'mode'=>'focus', | |
| 'format'=>'yyyy-mm-dd', | |
| 'showAnim' => 'slideDown', | |
| 'autoclose'=>true, | |
| ))); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT date(datecreate) as fecha, sum(qty) as totales, round(sum(total),2) as totalVendido | |
| FROM `facture_items` | |
| WHERE datecreate between '2013-06-1' and '2013-06-30' | |
| GROUP BY date(datecreate); | |
| select date(datecreate) as fecha, sum(qty) as totales, round(sum(total),2) as totalVendido | |
| from facture_items | |
| where datecreate between '2013-06-1' and '2013-06-30' | |
| group by date(datecreate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $fecha = date('Y-m-d'); | |
| $nuevafecha = strtotime ( '+2 day' , strtotime ( $fecha ) ) ; | |
| $nuevafecha = date ( 'Y-m-d' , $nuevafecha ); | |
| echo $nuevafecha; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER $$ | |
| USE `Fragata`$$ | |
| CREATE | |
| DEFINER=`root`@`localhost` | |
| TRIGGER `Fragata`.`IN_PRODUCTS_PRICE` | |
| AFTER INSERT ON `Fragata`.`products` | |
| FOR EACH ROW | |
| BEGIN |