Recent Posts
None | 1 sec ago
None | 2 sec ago
None | 6 sec ago
Lua | 7 sec ago
C# | 25 sec ago
None | 34 sec ago
None | 35 sec ago
VB.NET | 56 sec ago
None | 2 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 9th of Feb 2010 10:50:51 PM Download | Raw | Embed | Report
  1. ficaria algo assim por cima:
  2. CREATE PROCEDURE pegarTudoEmUmaLinha()
  3. BEGIN
  4.   DECLARE linha VARCHAR(255);
  5.   DECLARE sql CURSOR FOR SELECT texto DATE_FORMAT(n.data_noticia, '%d/%m/%Y') AS data_noticia2, CONCAT( u.nome_usuario, ' ', u.sobrenome_usuario) AS autor_noticia, cn.nome_cn AS canal, t.nome_tag FROM noticias n INNER JOIN usuario u ON u.id_usuario = n.idusuario_noticia INNER JOIN canal_noticias cn ON cn.id_cn = n.canal_noticia INNER JOIN tags_noticias t ON t.id_noticia_tag = '124' WHERE id_noticia = '124'
  6.  
  7.  OPEN sql;
  8.  REPEAT
  9.  FETCH cur1 INTO text;
  10.     linha .= text;
  11.  UNTIL done END REPEAT;
  12.  
  13.  CLOSE sql;
  14. END
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: