[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Een zoekmachine maken
Pagina 1 van 1

Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 10:36
door Boudewijn Maas
Hallo iedereen.
Ik wil een form maken die zoekt binenn onze database en de uitkomsten ervan weergeeft. Ik zou niet weten hoe ik dat script moet schrijven maar het klinkt nie tals een hele ingewikkelde. zou iemand mij hier mee verder kunnen helpen?

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 12:08
door Stef
[code="sql"]SELECT * FROM table WHERE keyword LIKE '%$keyword%';[/code]

Keyword kun je vervangen door de veld waarin hij in moet kijken.

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 12:51
door Boudewijn Maas

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 13:46
door Stef

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 14:47
door Remi
eerst maak je verbinding met je database.
Maar ff voorbeeld (er wordt niks uit de database geprint dit is alleen om verbinding te testen)
[code="php"]<?php

// hier onder volgen de login gevens voo database:
$dbusername = 'remi'; // De gebruikersnaam voor de databaseconnectie.
$dbpassword = ''; // Het wachtwoord voor de databaseconnectie.
$dbhost = 'localhost'; // De server waarop MySQL draait.
$dbdatabase = 'remi'; // De naam van de database waar we de naam in gaan invoeren.

// MySQL

// Connection
$connection = mysql_connect($dbhost, $dbusername, $dbassword);
mysql_select_db($dbdatabase);

echo 'connectie met database'

// Opvragen
$results = mysql_query('SELECT user, pass FROM users');

echo 'results geladen'

// Connection sluiten
mysql_close($connestion);

echo 'connectie gesloten'

?>[/code]

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 16:06
door Stef
Je hebt hier totaal geen foutafwerking inzitten Remi.

Je zou kunnen zeggen:

[code="php"]
if ( !$results )
{
die(mysql_error());
}
[/code]

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 16:22
door Rik

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 16:44
door Remi

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 17:40
door Boudewijn Maas

Re: Een zoekmachine maken

BerichtGeplaatst: 20 mei 2006 18:31
door Remi

Re: Een zoekmachine maken

BerichtGeplaatst: 22 mei 2006 07:08
door Boudewijn Maas

Re: Een zoekmachine maken

BerichtGeplaatst: 22 mei 2006 15:45
door Remi

Re: Een zoekmachine maken

BerichtGeplaatst: 23 mei 2006 09:46
door Derk