This file contains 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
foreach($states as $_state){ | |
$rv['stateid-'.$_state->getId()] = $_state->getName(); | |
foreach($_state->getAreas() as $_area){ | |
$rv['areaid-'.$_area->getId()] = '-- ' . $_area->getName(); | |
foreach ($_area->getCinemas() as $_cinema) { | |
$rv['cinemaid-'.$_cinema->getId()] = '---- ' . $_cinema->getName(); | |
} | |
} | |
} | |
} |
This file contains 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
mysqldump --skip-triggers --compact --no-create-info |
This file contains 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
'AR' => array( | |
'CABA' => 'Ciudad de Buenos Aires', | |
'Provincia de Buenos Aires' => 'Provincia de Buenos Aires', | |
'Entre Rios' => 'Entre Ríos', | |
'Santa Fe' => 'Santa Fé', | |
'Misiones' => 'Misiones', | |
'Corrientes' => 'Corrientes', | |
'Chaco' => 'Chaco', | |
'Santiago del Estero' => 'Santiago del Estero', | |
'Cordoba' => 'Córdoba', |
This file contains 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
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 | |
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644 |
This file contains 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
alter table descriptions modify name VARCHAR(2000) character set latin1; | |
alter table descriptions modify name blob; | |
alter table descriptions modify name VARCHAR(2000) character set utf8; |
This file contains 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
// Write CSV temporary file. | |
$temp = tmpfile(); | |
foreach ( $lines as $line ) { | |
fputcsv( $temp, $line ); | |
} | |
// Read temporary file and store contents into a variable. | |
fseek( $temp, 0 ); | |
$contents = ''; | |
while ( !feof( $temp ) ) { |