![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 11 Pomógł: 0 Dołączył: 2.09.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witaj ja mam taki oto kłopot
Cytat SELECT * FROM styper_user WHERE userlogin = 'kamil' AND useractive = 1 No database selected gdy chcę zalogować jako admin i gdy gość chce się zarejestrować to ma tylko "No database selected" i również zrobiłem także zapytanie poprzez P.My Admin i mam oto taki wynik Cytat -- phpMyAdmin SQL Dump <BR>-- version 2.9.1.1 <BR>-- <A class=postlink href="http://www.phpmyadmin.net/" target=_blank rel=nofollow>http://www.phpmyadmin.net</A> <BR>-- <BR>-- Host: localhost <BR>-- Czas wygenerowania: 24 Maj 2007, 11:30 <BR>-- Wersja serwera: 5.0.27 <BR>-- Wersja PHP: 4.4.4 <BR><BR>SET FOREIGN_KEY_CHECKS=0;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>SET AUTOCOMMIT=0;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>START TRANSACTION;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- <BR>-- Baza danych: `syntyper` <BR>-- <BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_group` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_group`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_group` ( <BR>`groupid` int(11) NOT NULL auto_increment, <BR>`groupname` varchar(255) default NULL, <BR>PRIMARY KEY (`groupid`), <BR>UNIQUE KEY `UQ_styper_group_1` (`groupname`) <BR>) TYPE=MyISAM AUTO_INCREMENT=23;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_match` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_match`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_match` ( <BR>`matchid` int(11) NOT NULL auto_increment, <BR>`matchhost` int(11) default NULL, <BR>`matchguest` int(11) default NULL, <BR>`matchhostscore` int(11) default NULL, <BR>`matchguestscore` int(11) default NULL, <BR>`matchdate` datetime default NULL, <BR>`roundid` int(11) default NULL, <BR>`matchplayed` tinyint(1) default NULL, <BR>`matchspecial` tinyint(1) NOT NULL default '0', <BR>PRIMARY KEY (`matchid`), <BR>KEY `roundid` (`roundid`), <BR>KEY `matchhost` (`matchhost`), <BR>KEY `matchguest` (`matchguest`) <BR>) TYPE=MyISAM AUTO_INCREMENT=25;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_news` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_news`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_news` ( <BR>`newsid` int(11) NOT NULL auto_increment, <BR>`newstitle` varchar(255) default NULL, <BR>`newscontent` text, <BR>`newsborn` datetime default NULL, <BR>PRIMARY KEY (`newsid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=9;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_post` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_post`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_post` ( <BR>`postid` int(11) NOT NULL auto_increment, <BR>`postcontent` text, <BR>`userid` int(11) default NULL, <BR>`newsid` int(11) default NULL, <BR>`postborn` datetime default NULL, <BR>PRIMARY KEY (`postid`), <BR>KEY `newsid` (`newsid`), <BR>KEY `userid` (`userid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=31;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_referer` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_referer`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_referer` ( <BR>`refererid` int(11) NOT NULL auto_increment, <BR>`userid` int(11) NOT NULL, <BR>`newid` int(11) NOT NULL, <BR>PRIMARY KEY (`refererid`), <BR>UNIQUE KEY `newid` (`newid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=4;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_round` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_round`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_round` ( <BR>`roundid` int(11) NOT NULL auto_increment, <BR>`roundname` varchar(255) default NULL, <BR>`rounddescription` text, <BR>`roundborn` datetime default NULL, <BR>`roundactive` tinyint(1) NOT NULL default '1', <BR>`roundclosed` tinyint(1) NOT NULL default '0', <BR>`rounddeleted` tinyint(1) NOT NULL default '0', <BR>PRIMARY KEY (`roundid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=16;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_setting` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_setting`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_setting` ( <BR>`settingid` int(11) NOT NULL auto_increment, <BR>`settingname` varchar(100) NOT NULL, <BR>`settingvalue` int(11) NOT NULL, <BR>PRIMARY KEY (`settingid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=5;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>INSERT INTO `styper_setting` VALUES (1, 'shot', 3);# Zmodyfikowanych rekordów: 1 <BR><BR>INSERT INTO `styper_setting` VALUES (2, 'diff', 2);# Zmodyfikowanych rekordów: 1 <BR><BR>INSERT INTO `styper_setting` VALUES (3, 'side', 1);# Zmodyfikowanych rekordów: 1 <BR><BR>INSERT INTO `styper_setting` VALUES (4, 'round', 1);# Zmodyfikowanych rekordów: 1 <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_team` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_team`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_team` ( <BR>`teamid` int(11) NOT NULL auto_increment, <BR>`teamname` varchar(255) default NULL, <BR>`teamborn` datetime default NULL, <BR>`teamactive` tinyint(1) NOT NULL default '1', <BR>PRIMARY KEY (`teamid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=17;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_type` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_type`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_type` ( <BR>`typeid` int(11) NOT NULL auto_increment, <BR>`matchid` int(11) default NULL, <BR>`typehost` int(11) default NULL, <BR>`typeguest` int(11) default NULL, <BR>`userid` int(11) default NULL, <BR>`typestatus` tinyint(4) default NULL, <BR>PRIMARY KEY (`typeid`), <BR>KEY `matchid` (`matchid`), <BR>KEY `userid` (`userid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=29;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>-- -------------------------------------------------------- <BR><BR>-- <BR>-- Struktura tabeli dla `styper_user` <BR>-- <BR><BR>DROP TABLE IF EXISTS `styper_user`;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR>CREATE TABLE `styper_user` ( <BR>`userid` int(11) NOT NULL auto_increment, <BR>`userlogin` varchar(100) default NULL, <BR>`userpass` char(32) default NULL, <BR>`userborn` datetime default NULL, <BR>`userperms` int(11) default '0', <BR>`groupid` int(11) default NULL, <BR>`score` bigint(20) default '0', <BR>`useremail` varchar(100) default NULL, <BR>`useractive` tinyint(1) NOT NULL default '0', <BR>`userdeleted` tinyint(1) NOT NULL default '0', <BR>PRIMARY KEY (`userid`), <BR>UNIQUE KEY `UQ_styper_user_1` (`userlogin`,`useremail`), <BR>KEY `groupid` (`groupid`) <BR>) TYPE=MyISAM AUTO_INCREMENT=44;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>SET FOREIGN_KEY_CHECKS=1;# MySQL zwrócił pusty wynik (zero rekordów). <BR><BR><BR>COMMIT;# MySQL zwrócił pusty wynik (zero rekordów). wie może ktoś jak można zlikwidować ten błąd który mi sie wyświetla który podałem na początku postu. Ten post edytował ascalcin 8.09.2007, 14:18:56 |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 566 Pomógł: 18 Dołączył: 23.08.2003 Skąd: Łomża Ostrzeżenie: (0%) ![]() ![]() |
w pliku konfiguracyjnym najprawdopodobniej nie wpisales nazwy bazy danych
-------------------- *Note: No animals were killed durning the construction of this post.
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 11 Pomógł: 0 Dołączył: 2.09.2007 Ostrzeżenie: (0%) ![]() ![]() |
w pliku Usrconf.php mam oto tak ustawione
XXX ( cenzura ) ;-) Cytat class DBConf { function DBConf() { /* * Nazwa bazy danych w ktorej trzymane maja byc tabelki typera */ $this->database = 'typer'; /* * Adres bazy danych */ $this->host = 'mysql1.XXX.pl'; /* * Uzytkownik */ $this->user = 'dbXXXX'; /* * Haslo */ $this->password = 'XXXXX'; } } ?> natomiast w pliku install.php mam oto takie parametry Cytat <?php // die('Install blocked'); require_once (dirname(__FILE__) . '/usr/usrconf.php'); require_once (dirname(__FILE__) . '/engine/DB.php'); $db = new DB; // baza $queryContent = file_get_contents('install.sql'); if ( !empty($queryContent)) { $queries = explode(';', $queryContent); foreach($queries as $query) { if (strlen(trim($query)) > 0) { $db->query($query); } } } else { die('ERROR install.sql'); } // dodanie admina // login : pass // admin : admin $sql = 'INSERT INTO `styper_user` VALUES (1, \'admin\', \'' . md5('admin'.MD5_VALUE) .'\', \'(NOW())\', 1, NULL, NULL, NULL, 1, 0)'; $db->query($sql); echo 'Install OK<br />login: admin<br />pass: admin<br /><br /><A href=index.html>[przejdz do typera]</a>'; jeśli można powiedzieć to jak mam ewentualnie co ustawić gdzie wpisać jeszcze nazwę bazy danych skoro już wszystko wpisałem jak sie nalezy tak mi sie wydaje i nic ![]() |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 291 Pomógł: 45 Dołączył: 21.08.2007 Ostrzeżenie: (0%) ![]() ![]() |
to od początku sprawdz sobie czy sql dziala, czy ma wszystkie tabele takie jakie powinien miec, czy istnieje uzytkownik ktory powinien sie laczyc celem pracy z danymi, czy ten uzytkownik ma uprawnienia do pracy na danej bazie, czy w skrypcie nie zrobiles literowki. czy dane podane w userconfig sa takie jak byc powinny. analiza krok po kroku da Ci odpowiedz na wszelkie nurtujace Cie pytania.
ale skoro Twierdzisz ze loginy, hasla i adresy baz masz ok to prawdopodobnie cos jest nie tak z zakresem uprawnien przypisanych do bazy (oczywiscie w przypadku jesli baza istnieje) |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 2.07.2025 - 08:19 |