Need Help w/MySQL PHP Settings For Flash Chat


#1

Hey,
I recently tried to set up a flash chat on my web site, but honestly since im new to php &
creating “tables” im finding myself having trouble doing something that shouldve taken 6 minutes.

I think I just need to point stuff to certain directories, but am not quite sure what & where to point things to.

My database name is “im”.
My MySQL Hostname is "core"
You can view the log file for this chat here
http://www.thekodclan.com/members/services/chat/agChat/log.php
The Flash Chat can be found here
http://www.thekodclan.com/members/services/chat/agChat.php

I need to change some values in a php file.
It says I must put correct parameters to connect to my MySQL database.

Then create tables with the same name specified on the php file with this dump:
CREATE TABLE $tablenamechosed1 (
id int(11) NOT NULL auto_increment,
name varchar(12) NOT NULL default ‘’,
testo varchar(255) NOT NULL default ‘’,
temp int(10) NOT NULL default ‘0’,
PRIMARY KEY (id)
) TYPE=MyISAM;

The only file I need to edit has the following php lines but im not quite sure what to point to.

<?php @mysql_pconnect("localhost","root",""); // mysql connection @mysql_select_db("im"); // database name $lines=10; // total lines on chat channel $testi="datamchat"; // chat table's name ?>

Also if someone can help out on creating the “Table” called for above. thanks! I appreciate the help fellas.

The Knights Of Death® :: An XBOX LIVE™ GAMING CLAN
http://www.thekodclan.com/


#2

[quote]The only file I need to edit has the following php lines but im not quite sure what to point to.

<?php @mysql_pconnect("localhost","root",""); // mysql connection @mysql_select_db("im"); // database name $lines=10; // total lines on chat channel $testi="datamchat"; // chat table's name ?>[/quote]

@mysql_pconnect(“core.thekodclan.com”,“database_username”,“database_password”); // mysql connection

Can’t help you with the username and password. :wink:

Point your browser to core.thekodclan.com, log in.
On the left hand panel, click on the name of your database.
Click on the SQL tab on the right.
Copy and paste the following lines into the run SQL queries box:

CREATE TABLE $tablenamechosed1 (
id int(11) NOT NULL auto_increment,
name varchar(12) NOT NULL default ‘’,
testo varchar(255) NOT NULL default ‘’,
temp int(10) NOT NULL default ‘0’,
PRIMARY KEY (id)
) TYPE=MyISAM;

Click Go.
Click Home (left hand panel)
Click Logout
Hit Cancel if you see a login prompt

All the best,
marsbar


#3

Amazing … Thanks for that help with setting up the “tables”.
I got it on my first try! Theres no more connection errors :

Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 10

Warning: mysql_query(): A link to the server could not be established in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 10

Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 14

Warning: mysql_query(): A link to the server could not be established in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 14

But now its like im geting these errors :

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 15

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/.jalopy/giancarlo/thekodclan.com/members/services/chat/agChat/log.php on line 56

Log can be found at :
http://www.thekodclan.com/members/services/chat/agChat/log.php

and in the chat window itself I now get this new error :

Error on sended data: 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 ‘values(’’,“Giancarlo”, “Hello World!”,‘1100834892’)’ at line
NM: Giancarlo
ENTRAT: Hello World!

Any ideas what this can be ? Againg thanks for the help Marsbar & the rest of the forums community.

The Knights Of Death® :: An XBOX LIVE™ GAMING CLAN
http://www.thekodclan.com/