error 404 dla powyższego linku, możesz poprawić?
Dalej nie ogarniam kuwety z tym sqlem.
W nadziei, że to coś pomoże, zainstalowałem Apache w wersji 2.2 i php w wersji 5.3. MySql nie zmieniałem.
w php.ini zmienilem zawartość na następującą:
Kod
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
extension=php_mysql.dll
extension_dir="C:\PHP\ext"
log_errors=On
error_log="C:\Windows\temp\php-errors.log"
Ale dalej nic z tego. Teraz w nowszym php wywala mi po prostu więcej błędów zamiast jednej linijki ;p
Cytat
Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: Nieznany host. in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: Nieznany host. (trying to connect via tcp://localhostkrystianhaslo:3306) in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Warning: mysql_connect() [function.mysql-connect]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: Nieznany host. in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 7
Sprawd połšczenie z serwerem.
Pomóżcie, Panowie

Coś si ruszyło.
Powyższy natłok błędów udało się usunąć dodając na początku skryptu linijkę
date_default_timezone_set('Europe/Warsaw');
teraz całość wygląda w następujący sposób:
<?php
date_default_timezone_set('Europe/Warsaw');
//połączenie z bazą mysql
die ("Sprawdź połączenie z serwerem.");
//utworz baze danych jezeli jeszcze nie istnieje
$create = mysql_query("CREATE DATABASE IF NOT EXISTS moviesite")
// wybierz nowo utworzoną bazę danych
//utworz tabele movie
$movie = "CREATE TABLE movie (
movie_id int(11) NOT NULL auto_increment,
movie_name varchar(255) NOT NULL,
movie_type tinyint(2) NOT NULL defeault 0,
movie_year int(4) NOT NULL defeault 0,
movie_leadactor int(11) NOT NULL defeault 0,
movie_director int(11) NOT NULL defeault 0,
PRIMARY KEY (movie_id),
KEY movie_type (movie_type.movie_year)
)";
//utworz tabele movietype
$movietype = "CREATE TABLE movietype (
movietype_id int(11) NOT NULL auto_increment,
movietype_label varchar(100) NOT NULL,
PRIMARY KEY (movietype_id)
)";
//utworz tabele people
$people = "CREATE TABLE people (
people_id int(11) NOT NULL auto_increment,
people_fullname varchar(255) NOT NULL,
people_isactor tinyint(1) NOT NULL defeault 0,
people_isdirector tinyint(1) NOT NULL defeault 0,
PRIMARY KEY (people_id)
)";
echo "Poprawnie utworzono bazę danych filmow!";
?>
Ale dalej nie działa jak należy i wypluwa przy próbie załadowania strony coś takiego:
Kod
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'defeault 0, movie_year int(4) NOT NULL defeault 0, movie_leadactor int(11) N' at line 4
Gdzie jest błąd? ; (