Articulos PHP
- 1.4 Trabajar con números en PHP.
- 1.8 Arreglos o array.
- 1.7 Enunciado exit o die.
- 2.2 Ciclo FOR.
- 3 PHP junto con MySQL.
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 128
Articulos Jquery
- 1.6 El método preventDefault.
- 3.1 Callback en Jquery
- 1.2 Usar CDN para utilizar Jquery
- 2.4 Usando AJAX con el método .post().
- 1.9 El elemento on.
Warning: Use of undefined constant jquery - assumed 'jquery' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 137
Articulos CSS
- 1 Hojas de estilo CSS.
- 1.1 Como incluir estilos en una página web.
- 1.2 Estructura de los estilos CSS.
Warning: Use of undefined constant css - assumed 'css' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 146
Articulos Mysql
- 3.7 Modificar la estructura de una tabla con ALTER TAB
- 1.8 Seleccionando registros con WHERE.
- 2.3 Seleccionando registros con NOT IN.
- 1.7 Ordenar valores de forma descendente.
- 3.3 Definición para columnas.
Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 155
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 199
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220
Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220
2.2 Registros o filas con valores muy específicos usando IN junto con WHERE.
En caso de que necesitemos registros o fila que tengan un valor específico, no un rango, podremos usar IN junto con WHERE. Entonces, para que se entienda un poco mejor, supongamos que tenemos una tabla usuarios y que necesitamos que se muestren los nombres de usuario o nick, de aquellos usuarios cuyo país sea igual a México y Guatemala, entonces la consulta sería como sigue:
SELECT nick FROM usuarios WHERE pais IN ("Mexico", "Guatemala")
Como se puede observar IN nos permite poner como condición determinados valores que son específicos únicamente.
Ahora si quisiéramos agregarle otro IN podríamos usar AND u OR, como se muestra a continuación:
SELECT nick FROM usuarios WHERE pais IN ("Mexico", "Guatemala")OR genero IN ("masculino")
Como se puede observar se ha agregado genero IN ("masculino") usando OR, lo que significa que se seleccionarán todas las filas en las cuales el país sea igual a México o Guatemala o el genero sea igual a masculino.
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
Registros específicos con IN.
Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
2.2



