Jump to content


Noturno's Content

There have been 129 items by Noturno (Search limited from 31/05/2023)



Ordernar por                Order  

#823851 Erro Ao Inserir Página De Fotos Coppermine

Posted by Noturno on 05/02/2007, 16:46 in PHP

Você está incluindo assim mesmo?

include (<?php include("galeria/index.php"); ?>)



#823978 Erro Ao Inserir Página De Fotos Coppermine

Posted by Noturno on 06/02/2007, 07:45 in PHP

Posta a index.php



#881590 Endereço Após Usar "action"

Posted by Noturno on 12/11/2007, 13:54 in PHP

isso, 3 segundos, viajei ali -_-'

É segunda feira, disfarça ehauiehauihae



#881560 Endereço Após Usar "action"

Posted by Noturno on 12/11/2007, 10:34 in PHP

Ele será executado após 3 minutos que a função foi iniciada kra...
tipo...

carregou

1...

2...

3...

CARREGOU!!!



#874950 Enchergando O Banco Do Servidor Na Minha Maquina

Posted by Noturno on 09/10/2007, 10:49 in Microsoft SQL Server

Abra o Management Studio e aponte o endereço do servidor e o tipo de autenticação, não tem mistério, se está retornando algum erro para você, ai é outra história...



#822440 Em Que Linguagem Você Programa?

Posted by Noturno on 01/02/2007, 09:32 in Outras Linguagens e Tecnologias

Delphi
C#
PHP
Pascal(não, não é exatamente a msm coisa que Delphi)
C++
Transact-SQL(Trampar com SQL não é fácil =/, é programação tbm =P)

Por enquanto só.



#823782 Dúvida Sql

Posted by Noturno on 05/02/2007, 14:17 in MySQL

Essa ferramenta é sensacional... uma xxxxxx mão na roda para os DBA's, se não fosse ela, nós ficariamos dias tentando otimizar o impossível ahhaha



#824030 Dúvida Sql

Posted by Noturno on 06/02/2007, 09:54 in MySQL

Dá uma lida no que eu falei, para trazer OBRIGATORIAMENTE os 2 utilize o operador "+"



#824074 Dúvida Sql

Posted by Noturno on 06/02/2007, 11:30 in MySQL

SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('+database +following')

tente isso



#824357 Dúvida Sql

Posted by Noturno on 07/02/2007, 08:33 in MySQL

michelsinclair,

me fala as colunas body e title do registro "DBMS stands for DataBase ... "

Do jeito que eu falei deveria funcionar, atente para essa parte no link que o Prety passou:

E aqui estão alguns exeplos:

*

apple banana

encontra linhas que contenha pela menos uma destas palavras.
*

+apple +juice

... ambas as palavras.
*

+apple macintosh

... palavra ``apple'', mas avaliada mais alto se também conter ``macintosh''.
*

+apple -macintosh

... palavra ``apple'' mas não ``macintosh''.
*

+apple +(>turnover <strudel)

... ``apple'' e ``turnover'', ou ``apple'' e ``strudel'' (em qualquer ordem), mas avalia ``apple pie'' melhor que ``apple strudel''.
*

apple*

... ``apple'', ``apples'', ``applesauce'', e ``applet''.
*

"some words"

... ``some words of wisdom'', mas não ``some noise words''.




#823690 Dúvida Sql

Posted by Noturno on 05/02/2007, 10:31 in MySQL

Com o exemplo do Petry é possível, mas não viável, ele vai fazer várias consultas causando uma sobrecarga desnecessária.
Qual banco utilizado?
O SQL Server tem uma ferramenta chamada Full-Text Search, outros bancos devem ter(Oracle ex.) mas desconheço.

Segue ai o tópico referente ao full-text no Books Online do SQL:

Full-Text Indexes
Full-text support for Microsoft® SQL Server™ 2000 data involves two features: the ability to issue queries against character data, and the creation and maintenance of the underlying indexes facilitating these queries.

Full-text indexes differ from regular SQL indexes in a number of ways.

Regular SQL indexes Full-text indexes
Stored under the control of the database in which they are defined. Stored in the file system, but administered through the database.
Several regular indexes per table are allowed. Only one full-text index per table is allowed.
Updated automatically when the data upon which they are based is inserted, updated, or deleted. Addition of data to full-text indexes, called population, can be requested through either a schedule or a specific request, or can occur automatically with the addition of new data.
Not grouped. Grouped within the same database into one or more full-text catalogs.
Created and dropped using SQL Server Enterprise Manager, wizards, or Transact-SQL statements. Created, managed, and dropped using SQL Server Enterprise Manager, wizards, or stored procedures.


These differences make a number of administrative tasks necessary. Full-text administration is carried out at several levels:

Server
Certain server-wide properties, such as resource_usage, can be set to increase and reduce the amount of system resources used by the full-text service.



Note The full-text engine runs as a service named Microsoft Search on Microsoft Windows NT® Server and Microsoft Windows® 2000 Server. The Microsoft Search service is not available for Microsoft SQL Server Personal Edition. Although this means the Microsoft Search service is not installed on Microsoft Windows 95 or Windows 98, Windows NT Workstation, or Windows 2000 Professional clients, these clients can make use of the service when they are connected to an instance of SQL Server Standard or Enterprise edition.

Database
A database must be enabled to use the full-text service. Meta data for one or more full-text catalogs can be created and dropped in an enabled database.

Full-text catalog
A full-text catalog contains full-text indexes in a database. Each catalog can serve the indexing needs of one or more tables within a database. The catalog is populated with indexes using the administrative facilities described here. (Full-text catalogs must reside on a local hard drive associated with the instance of SQL Server. Removable drives, floppy disks, and network drives are not supported.) A maximum of 256 full-text catalogs can be created on each server.



Note Full-text indexing is fully supported in a Windows NT failover cluster environment. For more information, see Running Full-Text Queries with Failover Clustering.

Table
A table must first be enabled for full-text support. Then meta data, such as the name of the table and its full-text catalog, is created for the full-text index associated with the table. After the table is enabled, you can populate it with the data in columns enabled for full-text support. If the full-text definition for a table is changed (for example, by including a new column that will also be indexed for a full-text search), the associated full-text catalog must be repopulated to synchronize the full-text index with the new full-text definition.

Column
Columns that support full-text queries can be added or dropped from an inactive registered table.

At all these levels, facilities are available to retrieve meta data and status information.

Like regular SQL indexes, full-text indexes can be automatically updated as data is modified in the associated tables. Alternatively, full-text indexes can be repopulated manually at appropriate intervals. This repopulation can be time-consuming and resource-intensive; therefore, it is an asynchronous process that usually runs in the background during periods of low database activity.

Tables with the same update characteristics (such as small number of changes versus large number of changes, or tables that change frequently during a particular time of day) should be grouped together and assigned to the same full-text catalog. By setting up full-text catalog population schedules in this way, full-text indexes stay synchronous with the tables without adversely affecting the resource usage of the database server during periods of high database activity.

It is important to plan the placement of full-text indexes for tables in full-text catalogs. When you assign a table to a full-text catalog, consider the following guidelines:

Always select the smallest unique index available for your full-text unique key. (A 4-byte, integer-based index is optimal.) This reduces the resources required by Microsoft Search service in the file system significantly. If the primary key is large (over 100 bytes), consider choosing another unique index in the table (or creating another unique index) as the full-text unique key. Otherwise, if the full-text unique key size reaches the maximum size allowed (450 bytes), full-text population will not be able to proceed.


If you are indexing a table that has millions of rows, assign the table to its own full-text catalog.


Consider the amount of change occurring in the tables being full-text indexed, as well as the number of table rows. If the total number of rows being changed, together with the numbers of rows in the table present during the last full-text population, represents millions of rows, assign the table to its own full-text catalog.


O Full-Text faz exatamente o que a pesquisa do Google faz(Não tudo igual, claro).
Exemplo:
Pra pesquisar no banco no seu caso vc faria

móveis + escritório

E ele retornaria o que vc quer

Edições do SQL Server e Full Text Search
Antes de você iniciar o processo de instalação do SQL Server 2000, você precisa determinar qual versão e edição do SQL Server deseja utilizar e se instalará o Full Text Search. O SQL Server 2000 Standard Edition é o mais adequado para a maioria dos servidores de produção. O SQL Server 2000 Enterprise Edition oferece recursos mais avançados como, por exemplo, suporte a failover clustering. O SQL Server 2000 Enterprise Edition incorporou ainda a capacidade de gerenciar grandes tabelas através de múltiplos servidores.

Ambas as edições do SQL Server 2000 podem rodar no Win2K Server, Win2K Advanced Server, Win2K Datacenter Server, NT Server 4.0, Standard Edition com SP5 ou posterior, e ainda, no NT Server 4.0, Enterprise Edition com SP5 ou posterior. A Microsoft diz que views indexadas rodam apenas no SQL Server 2000 Enterprise Edition, porém, eu já experimentei executá-las no SQL Server 2000 Standard Edition sem problemas.

A Microsoft lançou o SQL Server 2000 Personal Edition para desenvolvedores e outros que tivessem a necessidade de possuir uma cópia local do SQL Server, talvez em um notebook que fosse utilizado também fora do escritório. Essas edição, mais simples, perde algumas das funcionalidades - por exemplo, ela não incorpora o Full Text Search. Se você está instalando o SQL Server no Win2K Professional, NT Workstation, Windows Me, ou Windows 9x, apenas a Personal Edition funcionará. Escolhendo a Standard Edition em qualquer uma dessas plataformas, gerará uma mensagem de erro.

O serviço Full Text Search utiliza muitos dos mesmos componentes do Microsoft Index Server. Esse serviço permite a desenvolvedores indexar dados no formato texto e fazer buscas que contenham as palavras ou as frases procuradas. O recurso oferecido pelo serviço Full Text Search exige uma razoável quantidade de espaço em disco para indexar os textos. A instalação do Full Text Search no SQL Server 2000 acontece mesmo na instalação típica, diferentemente da versão 7.0, ainda que você escolha a configuração mínima. Caso não instale esse recurso inicialmente, você pode, quando desejar, voltar a rodar o programa de instalação para fazê-lo.



http://www.microsoft.../col_sql_2.aspx



#823754 Dúvida Sql

Posted by Noturno on 05/02/2007, 13:14 in MySQL

Prety vc não sabe como me deixou feliz em saber que o MySQL tem isso hahahahaha...



#825201 Dúvida Sql

Posted by Noturno on 09/02/2007, 10:53 in MySQL

;)



#823096 Dúvida Com Upload Renomeando Arquivo

Posted by Noturno on 02/02/2007, 16:47 in PHP

mysql_insert_id() faz basicamente a msm coisa que o que eu passei.
Com relação a processamento, ele vai consultar o banco.



#823091 Dúvida Com Upload Renomeando Arquivo

Posted by Noturno on 02/02/2007, 16:39 in PHP

Utilize da forma que eu falei que vc vai obter o ultimo id de forma mais fácil



#823083 Dúvida Com Upload Renomeando Arquivo

Posted by Noturno on 02/02/2007, 16:19 in PHP

select max(id) from tabela

Simples assim, ele vai trazer o maior ID do banco.



#823109 Dúvida Com Upload Renomeando Arquivo

Posted by Noturno on 02/02/2007, 16:53 in PHP

Eu to vadiando aqui no trampo ehahauiheuiaheuihaeuia...
vadiagem malemolente no trampo ehauiehaeuiaheuia...



#823098 Dúvida Com Upload Renomeando Arquivo

Posted by Noturno on 02/02/2007, 16:48 in PHP

Mas da mesma forma se algo já tiver sido adicionado posteriormente vai dar problema...



Eu acho... heuiaheuihaea, não testei...

Bahhh rapaz!!!!.. Realmente Bingo!! :D

Putz.. nem tinha percebido tbm.. é tanto código que me perdi nas simples aspas.. :wacko:

Noturno, vlw pela dica, mais ainda acho dessa maneira mais prática do que ter que ficar fazendo Select ao banco. Mais valeu mesmo.

Funciono tudo certinho, upload, resize, cadastro. Só tenho uma pequena dúvida, não relacionada ao código. Tava vendo que essa parte de Upload e resize de imagem, precisa de ter albuma biblioteca instalada no servidor Web que hospedarei o site. No caso aqui em casa, localmente está funcionando, mais como vou saber se preciso instalar no servidor?? Essa parte de biblioteca não tenho a mínima idéia de como funciona.

Pessoal, por enquanto.. valeu de coração pela ajuda.. E Let´s go!

Abraços..
Possamai (y)



Joga um arquivo com essa função no servidor e olha ele, veja se a biblioteca está instalada, se não, solicite ao servidor para instalar:

<?
phpinfo();
?>



#824454 Duvida Na Query.... Usando Left

Posted by Noturno on 07/02/2007, 12:21 in MySQL

Se tiver traços não é int(inteiro).

faça assim

$sql = mysql_query("SELECT *, LEFT(numero,8) as resumo FROM tabela WHERE LEFT(numero,8) = $variavel ORDER BY numero ASC");



#851279 Delphi For Php

Posted by Noturno on 28/05/2007, 08:37 in Editores HTML Proprietários

A ferramenta não está com bugs acima do normal de qualquer aplicação recem lançada, é uma ótima ferramenta.
Mas como disse o The Cod, se quiser aprender realmente php utilize o seguinte software, C:\Windows\notepad.exe



#874943 Delete Do Sql Nao Quer Funfa

Posted by Noturno on 09/10/2007, 10:44 in Microsoft SQL Server

O que vc quer dizer com "não funciona"?

Não retorna nada? dá erro? não deleta nada?
Seja mais específico...
De qualquer forma execute antes

SELECT FROM contas WHERE email=''
ou
SELECT FROM contas WHERE email is NULL

Veja se retorna algo.



#822459 De Postsql Para Mysql

Posted by Noturno on 01/02/2007, 10:08 in PostgreSQL

Nossa eu viajei, pensei que estivesse no fórum de PHP hahahahahahha, mas tudo bem



#822059 De Postsql Para Mysql

Posted by Noturno on 31/01/2007, 10:16 in PostgreSQL

Precisa ter acesso ao servidor.
Você tem dúvidas da forma de conexão ou das instruções utilizadas?



#823012 De Postsql Para Mysql

Posted by Noturno on 02/02/2007, 14:08 in PostgreSQL

Se no Script de Instalação existe isso, provavelmente deve haver alguns milhares de if's awe pelos script para trocar as instruções.



#822437 De Postsql Para Mysql

Posted by Noturno on 01/02/2007, 09:23 in PostgreSQL

Imigrar eu não sei, agora migrar sim =P

Inicialmente vc troca as funções de conexão, manipulação e etc. de pg_ para mysql_.
Rode o script veja no que dá, se der erro em determinadas partes é por causa da instrução sql utilizada, então vc precisa migrar algumas funções do postgresql para o mysql.

Possível é sim, claro, mas é trabalhoso, tão qto criar um novo as vzs.




IPB Skin By Virteq