Archivo de la categoría: Programación

what the fuck??!! Amor en PHP ?

“Si me quieres, te querrémás y más a cada instante mientras vivaporque si no me quieres no soy nada” «Mi esperanza es ser parte de tu vida y que tú seas parte de la mía.» Tags: friki, php

ALTER TABLE ORDERS FOREIGN KEY

MySQL: CREATE TABLE ORDERS (Order_ID integer, Order_Date date, Customer_SID integer, Amount double, Primary Key (Order_ID), Foreign Key (Customer_SID) references CUSTOMER(SID)); Oracle: CREATE TABLE ORDERS (Order_ID integer primary key, Order_Date date, Customer_SID integer references CUSTOMER(SID), Amount double); SQL Server: CREATE TABLE ORDERS (Order_ID integer primary key, Order_Date datetime, Customer_SID integer references CUSTOMER(SID), Amount double); Below are… Leer más »

MySQL migration: MyISAM to InnoDB

MySQL migration: MyISAM to InnoDB   By Keith Winston on July 18, 2005 (8:00:00 AM) The MySQL database is unique in that it offers multiple storage engines. The SQL parser and front end interfaces are separate from the storage engines, so you can choose among nine low-level table formats the one that suits your application… Leer más »

What is referential integrity?

  Simply put, referential integrity means that when a record in a table refers to a corresponding record in another table, that corresponding record will exist. Look at the following:

MySQL search and replace

update tablename set field = replace(field,’search_for_this’,’replace_with_this’); Tags: search, replace, mysql

Strings

Concatenar strings $str1 = “hola “;$str2 = “que tal “;$str3= “como estas?”; $str4 = $str1.$str2.$str3; Strings CharsSe pueden reemplazar los caracteres:$str1 = «0123456789″;$str1[2]=»x«; Cambiar a mayusculas y minúsculas:strtoupper();strtolower(); Capitaliza la primera letra:ucfirst(); Capitaliza todas las letras:ucwords();ASCII chr(32) = spacechr(65) = A ord(“A”) = 65;   Tags: strings

unset()

unset() Syntax:    void unset(mixed var [, mixed var, …])var    Variable to unset. Unsets a variable. unset() destroys one or more variables and deallocates the memory associated with them. Code: <?php $a = «Some data»; unset($a); if (!isset($a)) {    print «\$a is no longer available»; } ?> Output: $a is no longer available

Introducción a PHP

¿ Que es PHP ? Scripting / Programming Language (“C – Like”) FREE and Open Source Fast, Open, Stable, Cross Platform! No compilation! PHP is all about “Community”