Code Snippets

Buscar palabra en toda la Base de Datos SQL Server

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[BUSCARSTRINGENBBDD](@StrValorBusqueda nvarchar(100)) AS BEGIN CREATE TABLE #Resultado (NombreColumna nvarchar(370), ValorColumna nvarchar(3630)) SET NOCOUNT ON DECLARE @NombreTabla nvarchar(256), @NombreColumna nvarchar(128),@StrValorBusqueda2 nvarchar(110); SET @NombreTabla = »; SET @StrValorBusqueda2 = QUOTENAME(‘%’ + @StrValorBusqueda + ‘%’,»»); WHILE @NombreTabla IS NOT NULL BEGIN SET @NombreColumna = » SET @NombreTabla =(SELECT

Buscar palabra en toda la Base de Datos SQL Server Leer más »

Crear gráfica con phpChart

<?php require_once ("conf.php"); ?> <!DOCTYPE html> <html lang="es"> <head> <title>Lacodigoteca.com</title> <meta charset="UTF-8"> </head> <body> <header> <h1>Prueba de gráficas con phpChart</h1> </header> <section> <article> <h2><a href="https://lacodigoteca.com">Lacodigoteca.com</a></h2> <p>Ejemplos JS, PHP, SQL Server, jQuery HTML5 y CSS3</p> <?php // Creamos la gráfica $pc = new C_PhpChartX(array(array(0,2,4,6,1,3,5,8,10,7,9)),’basic_chart’); // Efecto de gráfica en movimiento $pc->set_animate(true); // Añadimos un título a

Crear gráfica con phpChart Leer más »

Eliminar etiquetas HTML en SQL

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO — Funcion que se encarga de decodificar textos en HTML ALTER FUNCTION [dbo].[eliminarHTML](@HTMLText varchar(MAX)) RETURNS varchar(MAX) AS BEGIN DECLARE @Start int DECLARE @End int DECLARE @Length int — Sustituye cualquier carácter especial ASCII por el carácter visible que corresponde. SET @HTMLText = REPLACE(@HTMLText, ‘<br>’, CHAR(13) + CHAR(10))

Eliminar etiquetas HTML en SQL Leer más »

Mostrar datos SQL en HTML 3

<html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> </head> <body onload="init()"> <table class="table table-hover"> <thead> <tr> <th>idtienda</th> <th>nombre/th> <th>direccion</th> <th>cp</th> <th>provincia</th> <th>provincia</th> <th>provincia</th> <th>provincia</th> <th>provincia</th> </tr> </thead> <tbody id="datos"> </tbody> </table> <script type="text/javascript" src="modulos/clientes/clientes.js"></script> </body> </html>

Mostrar datos SQL en HTML 3 Leer más »

Scroll al inicio