8 de julio de 2009

¿Un teléfono en México puede trabajar a la ves con Iusa, Movi y Telcel?

Esta pregunta me la hizo un amigo.. de ahí me di cuenta que enr ealidad no tengo una idea muy clara. Por ello mejor le pregunté a mi esposa, ella sí que sabe!

TDMA (Time Division Multiple Access) y GSM (Global System for Mobile Communication) son estándares. La tecnología que usan es Digital y por división de tiempo. CDMA (Code Division Multiple Access) es otro estándar y utiliza tecnología digital y por división de códigos.

Realmente lo que conocemos como TDMA debería ser llamado tecnología DAMPS (Digital Advanced Mobile Phone System) que en un principio utilizó tecnología análoga, por lo que no se podían transmitir datos; posteriormente se introdujo lo "digital" y empezaron los SMS.

En Telcel primero se implementó tecnología DAMPS, después el estándar GSM con tecnología TDMA (por división de tiempo) y para incrementar la velocidad en el envío de paquetes posteriormente se implementó EDGE (Enhanced Data Rate for Global Evolution) sobre GSM. Ahora está implementando tecnología
WCDMA para soportar 3G que es multimedia en "tiempo real" (por ejemplo videollamadas, videoconferencias, tele-compras, servicios bancarios, e-mail y por supuesto: voz).

Iusacell por ejemplo, ha utilizado tecnología por división de códigos WCDMA pero no sé exactamente que evolución ha tenido internamente.

30 de junio de 2009

PHP code to manage errors un PostgreSQL

A few eeks ago, an old customer came back to me asking for a way to manage PostgreSQL errors in PHP, this is because he has a PHP web based system with access to a PostgreSQL database.
Now, as many other PHP web-based systems out there, the error exposure is enabled, thus, every time a query returns an error, it was printed in web page, which as you can think, is not a good thing.

Now, in order to avoid this you can easily go to the php.ini file and change the display_errors directive from On to Off and enable the error logging. But, how to catch the errors and display them in a friendly manner to customer? With this workaround, nothing will be displayed and customer won't have a clue of what's going on, oh well, yes, because its data may not be displayed.

So a little solution has been implemented with the following code:


INSERT CODE HERE


Ok, let's explain: as you should know there is a set of common error codes in SQL, and specifically, for PostgreSQL there is a well explained section of its docummentation.

As you may infer, the SQL error code 23505 (UNIQUE VIOLATION) may appear whenever a violation of a unique constrain occurs, no matter in what table it happens so, in order to create a customized message, system must be aware of who (what page) requested that operation.Is not the same thing a UNIQUE VIOLATION from the add page than from the modify page, neither if it happens in the users module or the customers module.

In order to customize errors the sqlErrorCodes.php file has been created, it contains, as an array, all the possible errors that can be