Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów
[php/mysql] Brak wyswietlania newsow - Wersja do druku

+- Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów (https://www.webmastertalk.pl)
+-- Dział: Technologie internetowe - tworzenie stron WWW (https://www.webmastertalk.pl/forum-technologie-internetowe-tworzenie-stron-www)
+--- Dział: Początkujący webmaster (https://www.webmastertalk.pl/forum-poczatkujacy-webmaster)
+--- Wątek: [php/mysql] Brak wyswietlania newsow (/thread-php-mysql-brak-wyswietlania-newsow)



[php/mysql] Brak wyswietlania newsow - kentaro - 21-10-2011

Witam
Jest to moj pierwszy post, wiec przepraszam jesli wpisalem zle tytul tematu i slabo opisalem problem.
Praktycznie na php sie nie znam, moze tam jakies minimum z minimum ale dostalem pewien cms od znajomego i praktycznie wszystko dziala oprocz newsow.
Link do strony: http://cmstest666.ugu.pl/index.php

Cytat: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 'limit WHERE co='news'' at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /virtual/c/m/cmstest666.ugu.pl/enigme/class/dev.php on line 8

Warning: Division by zero in /virtual/c/m/cmstest666.ugu.pl/enigme/class/news.php on line 11
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 'OFFSET 0' at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /virtual/c/m/cmstest666.ugu.pl/enigme/class/news.php on line 20


http://cmstest666.ugu.pl/pliki/news.txt
http://cmstest666.ugu.pl/pliki/dev.txt
linki do tego pliku news.php i dev.php
tabelka w bazie wyglada tak

Cytat:CREATE TABLE `news` (
`id` int(20) NOT NULL auto_increment,
`act` int(2) NOT NULL default '0',
`tytul` varchar(64) NOT NULL default '',
`tresc` text NOT NULL,
`dtresc` text NOT NULL,
`autor` int(20) NOT NULL default '0',
`data` int(35) NOT NULL default '0',
PRIMARY KEY (`id`)
);


Pomogl by ktos z naprawieniem tych newsow ? ktore pliki jeszcze mam ewentualnie podac?


RE: [php/mysql] Brak wyswietlania newsow - Marys - 21-10-2011

Jest błąd w SQL, albo nie istnieje taka kolumna albo jest coś źle napisane.