Halloversuche gerade mein handy system weiter zu machen nur leider geht mein query nich und ich checke nicht was ich falsch mache: mysql log: [01:19:08] >> mysql_query( Connection handle: 1 )
[01:19:08] CMySQLHandler::Query(SELECT kontakt FROM hkontakte WHERE besitzer = 'Jan_Coleman) - An error has occured. (Error ID: 1064, 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 ''Jan_Coleman' at line 1)
[01:19:08] >> mysql_store_result( Connection handle: 1 )
[01:19:08] CMySQLHandler::StoreResult() - No data to store.
[01:19:08] >> mysql_fetch_row_format( Connection handle: 1 )
[01:19:08] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[01:19:08] >> mysql_free_result( Connection handle: 1 )
[01:19:08] CMySQLHandler::FreeResult() - The result is already empty.
[01:19:11] >> mysql_query( Connection handle: 1 )
[01:19:11] CMySQLHandler::Query(SELECT kontakt FROM hkontakte WHERE besitzer = 'Jan_Coleman) - An error has occured. (Error ID: 1064, 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 ''Jan_Coleman' at line 1)
[01:19:11] >> mysql_store_result( Connection handle: 1 )
[01:19:11] CMySQLHandler::StoreResult() - No data to store.
[01:19:11] >> mysql_fetch_row_format( Connection handle: 1 )
[01:19:11] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[01:19:11] >> mysql_free_result( Connection handle: 1 )
[01:19:11] CMySQLHandler::FreeResult() - The result is already empty.
dann die tabelle:
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 11. September 2011 um 23:29
-- Server Version: 5.5.8
-- PHP-Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Datenbank: `samp`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `hkontakte`
--
CREATE TABLE IF NOT EXISTS `hkontakte` (
`besitzer` varchar(24) NOT NULL,
`kontakt` varchar(24) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `hkontakte`
--
INSERT INTO `hkontakte` (`besitzer`, `kontakt`) VALUES
('Jan_Coleman', 'Tim'),
('Jan_Coleman', 'Jms');
Alles anzeigen
und dann noch der script teil: stock Kontakt(playerid)
{
MAX_KONTAKTE[playerid]=0;
new mysql[60];
new Nama[MAX_PLAYER_NAME];
GetPlayerName(playerid,Nama,sizeof(Nama));
format(mysql, sizeof (mysql), "SELECT kontakt FROM hkontakte WHERE besitzer = '%s'",Nama);
mysql_query(mysql);
mysql_store_result();
new Get[128];
new string[640];
while(mysql_fetch_row(Get))
{
MAX_KONTAKTE[playerid]++;
format(KontaktInDb[playerid][MAX_KONTAKTE[playerid]],MAX_PLAYER_NAME,"%s",Get);
format(string,sizeof(string),"%s%s\r\n",string,Get);
SendClientMessage(playerid,Gelb,Get);
}
mysql_free_result();
new all[1024];
format(all,1024,"Zurück\nKontakt Hinzufügen\n%s",string);
ShowPlayerDialog(playerid,DIALOG_HANDY_KONTAKTE,DIALOG_STYLE_LIST,"Kontakte",all,"Antworten","Schließen");
return 1;
}
dann noch halt es werde die kontakte nich angezeigt auch nicht durch das debuggen ist ja eigl klar nur was daran falsch?
MFG janpplayer