PHP code example of sincco / sfphp

1. Go to this page and download the library: Download sincco/sfphp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sincco / sfphp example snippets


<app>
    <key>la clave generada por el script iniciar.php o que puedes obtener desde el script llave.php</key>
    <name>nombre de la app</name>
    <company>sincco</company>
        <cache>segundos</cache>
        <eemailapi>API de ElasticMail</eemailapi>
</app>

<bases>
    <default>
        <host></host>
        <user></user>
        <password>encriptado con la llave de la app, puedes usar en script encriptar.php?s=password</password>
        <dbname></dbname>
        <type>firebird|mysql|sqlsrv|otro</type>
    </default>
</bases>

$tabla = $this->getModel();
$tabla->candidatosCabecera('idCandidato');
$tabla->innerCodigosAcceso(['USING'=>'idCandidato']);
$tabla->filterIdCandidato([1,2,3]);
$tabla->fieldsCandidatosCabecera(['idCandidato','paterno','materno','nombre']);
foreach ($tabla->getCollection() as $registro) {
    echo "<pre>";var_dump($registro->idCandidato, $registro->idCodigo, $registro->codigo);echo "</pre>";
    $registro->genero = 'Prefiero no decir';
    $registro->nacionalidad = NULL;
    echo $registro->save();
}

$tabla->candidatosCabecera('idCandidato');
$tabla->paterno = 'Este';
$tabla->materno = 'Es';
$tabla->nombre = 'Mi Nombre';
echo $tabla->save();