flashgocrazy wrote:
Magnie wrote:
The reason it doesn't connect to the database is because there are to many people already connected to it. So it either has to do with the web host, or something to do with the coding to connect to the database.
Code:
<b>Warning</b>: mysql connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User [user info removed] already has more than 'max user connections' active connections in <b>/home/vol5/xtreemhost.com/[user info removed]/htdocs/set.php</b> on line <b>13</b><br />the coding for the set.php is
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>also XXX is where you enter in the details for mysql
Thanks.
That shows that it's the host that is maxing out on MySQL connections. If you use a different host, it should be fixed.
Offline
flashgocrazy wrote:
Dominic1 wrote:
flashgocrazy wrote:
source code? for panther projectSorry, There's about a 0.5% chance of me releasing the source code. I need to keep the variables hidden so the chat is private.
sorry to burst your bubble, but I got the source code with all the blocks in it
I found the "modified" version of panther in the exe file
Its practically not modified at all. All you modified was adding the dev menu![]()
No, I actually added one block. And I know that it's possible to get the full src, just PLEASE don't release how.
Offline
Dominic1 wrote:
Laternenpfahl wrote:
Dominic1 wrote:
Plus, it isn't even my database right now. It's jonnydean's database.I have an app for that. Not gonna uses it tho.
app for what?
Seeing the hex code.
I could find the Passwords.

Offline
Dominic1 wrote:
flashgocrazy wrote:
Dominic1 wrote:
Sorry, There's about a 0.5% chance of me releasing the source code. I need to keep the variables hidden so the chat is private.
sorry to burst your bubble, but I got the source code with all the blocks in it
I found the "modified" version of panther in the exe file
Its practically not modified at all. All you modified was adding the dev menu![]()
No, I actually added one block. And I know that it's possible to get the full src, just PLEASE don't release how.
Found block, [connect to website: ________] o.O
2. Good idea I will release the source with the chat using.. MY DATABASE
Last edited by flashgocrazy (2011-11-26 13:10:51)
Offline
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>
How many fields do you need in the mysql table?
Last edited by flashgocrazy (2011-11-26 15:06:50)
Offline
flashgocrazy wrote:
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>video tut for making it work in xtreemhost?
There aren't Video Tutorials for everything. All you do is change the settings to your database info then upload the file to xtreemhost then you run the file. If this is your site: http://scratchtest21.xtreemhost.com/set.php, then it is working fine.
Offline
Magnie wrote:
flashgocrazy wrote:
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>video tut for making it work in xtreemhost?
There aren't Video Tutorials for everything. All you do is change the settings to your database info then upload the file to xtreemhost then you run the file. If this is your site: http://scratchtest21.xtreemhost.com/set.php, then it is working fine.
its not getting the value of anything example here
Offline
flashgocrazy wrote:
Dominic1 wrote:
flashgocrazy wrote:
sorry to burst your bubble, but I got the source code with all the blocks in it
I found the "modified" version of panther in the exe file
Its practically not modified at all. All you modified was adding the dev menu![]()
No, I actually added one block. And I know that it's possible to get the full src, just PLEASE don't release how.
Found block, [connect to website: ________] o.O
2. Good idea I will release the source with the chat using.. MY DATABASE
MAKE SURE that you also change the variable names to something that:
A) Is not near the same as the ones I used
B) Don't contain iChat Global in the names because it would be a different version by you, COMPLETELY unsupported by me.
Offline
Dominic1 wrote:
flashgocrazy wrote:
Dominic1 wrote:
No, I actually added one block. And I know that it's possible to get the full src, just PLEASE don't release how.
Found block, [connect to website: ________] o.O
2. Good idea I will release the source with the chat using.. MY DATABASEMAKE SURE that you also change the variable names to something that:
A) Is not near the same as the ones I used
B) Don't contain iChat Global in the names because it would be a different version by you, COMPLETELY unsupported by me.
did you read posts #80 and #82?
Last edited by flashgocrazy (2011-11-26 15:18:27)
Offline
flashgocrazy wrote:
Dominic1 wrote:
flashgocrazy wrote:
Found block, [connect to website: ________] o.O
2. Good idea I will release the source with the chat using.. MY DATABASEMAKE SURE that you also change the variable names to something that:
A) Is not near the same as the ones I used
B) Don't contain iChat Global in the names because it would be a different version by you, COMPLETELY unsupported by me.did you read posts #80 and #82?
yes, but I don't want people to create other programs that access this one's data. Can I trust you to do that?
Offline
Dominic1 wrote:
flashgocrazy wrote:
Dominic1 wrote:
MAKE SURE that you also change the variable names to something that:
A) Is not near the same as the ones I used
B) Don't contain iChat Global in the names because it would be a different version by you, COMPLETELY unsupported by me.did you read posts #80 and #82?
yes, but I don't want people to create other programs that access this one's data. Can I trust you to do that?
YES, I just need to know how to fixthis when I set up scratch live what do I do? do you have a tut how to do that with pics explaining how?
Offline
Database Connected foo 1 Getting request
I still see nothing wrong. Do you have the right table?
It also seems that the code needs some changing anyway, I'll fix up a better set.php file.
Last edited by Magnie (2011-11-26 16:31:17)
Offline
flashgocrazy wrote:
Dominic1 wrote:
flashgocrazy wrote:
sorry to burst your bubble, but I got the source code with all the blocks in it
I found the "modified" version of panther in the exe file
Its practically not modified at all. All you modified was adding the dev menu![]()
No, I actually added one block. And I know that it's possible to get the full src, just PLEASE don't release how.
Found block, [connect to website: ________] o.O
2. Good idea I will release the source with the chat using.. MY DATABASE
I told him how.
But I won't tell anyone else now that I know what he used it for XD
Offline
Magnie wrote:
Code:
Database Connected foo 1 Getting requestI still see nothing wrong. Do you have the right table?
It also seems that the code needs some changing anyway, I'll fix up a better set.php file.
Okay I've fixed up the set.php file, it should be much much cleaner:
<title>Scratch-Live <?php
$title = 'Variables';
echo($title);?></title>
<?php
$SQLhost = "127.0.0.1";
$SQLuser = "root";
$SQLpass = "";
$SQLdatabase = "test";
$SQLtable = "scratchlive";
$con = mysql_connect($SQLhost,$SQLuser,$SQLpass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
echo "Database Connected";
echo "<br />";
if ( isset($_GET['user']) ) { $user = $_GET["user"]; } else { $user = ""; } // Since my WAMP server doesn't automatically ignore non-set data, I've added these if, else statements.
if ( isset($_GET['pass']) ) { $pass = $_GET["pass"]; } else { $pass = ""; }
if ( isset($_GET['value']) ) { $value = $_GET["value"]; } else { $value = ""; }
echo $user;
echo "<br />";
echo $pass;
echo "<br />";
echo $value;
echo "<br />";
if ($pass == 1) {
$val = strlen($value);
if ($val > 0) {
echo "Acting on request";
$act = "set";
} else {
echo "Getting request";
$act = "get";
}
echo "<br />";
//**************************
//******DATABASE STUFF******
//**************************
mysql_select_db($SQLdatabase, $con);
if(1==0)
{
$sql = "CREATE TABLE" . $SQLtable. "
(
Username varchar(20),
Value varchar(20),
)";
mysql_query($sql,$con);
echo "<br />";
echo "Table made";
echo "<br />";
}
$result = mysql_query("SELECT * FROM ".$SQLtable." WHERE Username='$user'");
$row = mysql_fetch_array($result);
if ( $row['Username'] != "" ) { $get = $row['Value']; }
else { $get = ""; }
if ($get == "") {
$query = "INSERT INTO ".$SQLtable." (Username, Value) VALUES ('$user', '$value')";
mysql_query($query);
}
echo "<br />";
echo "\n";
if ($act == "get") {
echo $get;
}
if ($act == "set") {
$query = "UPDATE ".$SQLtable." SET Value = '".$value."' WHERE Username = '".$user."'";
mysql_query($query);
echo "Updated";
}
}
mysql_close($con);
?>Remember to change the Database info.
Offline
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>
do you have a .sql file of the database of scratch live? and a link to it?
Last edited by flashgocrazy (2011-11-27 19:59:15)
Offline
Dominic1 wrote:
Also, for privacy reasons, the source code of ScratchChat will most likely NOT be released, as this would make it easy for people to hack into the systems.
Okay, if you don't want me and everyone else with Mac, Linux, Solaris, etc. to download it.


Offline
flashgocrazy wrote:
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>do you have a .sql file of the database of scratch live? and a link to it?
If you look through the code, you will see some MySQL "CREATE TABLE" code:
CREATE TABLE Users
(
Username varchar(20),
Value varchar(20),
);In phpMyAdmin click "SQL" or "Query" then run that code in the box and it should create the table you need.
Offline
Magnie wrote:
flashgocrazy wrote:
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>do you have a .sql file of the database of scratch live? and a link to it?
If you look through the code, you will see some MySQL "CREATE TABLE" code:
Code:
CREATE TABLE Users ( Username varchar(20), Value varchar(20), );In phpMyAdmin click "SQL" or "Query" then run that code in the box and it should create the table you need.
error: #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 ')' at line 5
Offline
Magnie wrote:
flashgocrazy wrote:
johnnydean1 wrote:
set.php
Code:
<title>Scratch-Live <?php $title = 'Variables'; echo($title);?></title> <?php $SQLhost = "xxx"; $SQLuser = "xxx"; $SQLpass = "xxx"; $SQLdatabase = "xxx"; $SQLtable = "xxx"; $con = mysql_connect($SQLhost,$SQLuser,$SQLpass); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "Database Connected"; echo "<br />"; $user = $_GET["user"]; $pass = $_GET["pass"]; $value = $_GET["value"]; echo $user; echo "<br />"; echo $pass; echo "<br />"; echo $value; echo "<br />"; if ($pass == 1) { $val = strlen($value); if ($val > 0) { echo "Acting on request"; $act = "set"; } else { echo "Getting request"; $act = "get"; } echo "<br />"; //************************** //******DATABASE STUFF****** //************************** mysql_select_db($SQLdatabase, $con); if(1==0) { $sql = "CREATE TABLE" . $SQLtable. " ( Username varchar(20), Value varchar(20), )"; mysql_query($sql,$con); echo "<br />"; echo "Table made"; echo "<br />"; } $you = " SELECT * FROM Users"; $you4 = $you; $result = mysql_query($you4) or die(mysql_error()); $n = 0; $get = ""; $x = 0; while($row = mysql_fetch_array($result)) { $x = $x + 1; $you = $row['Username']; if ($you == $user) { $n = $x; if ($act == "get") { $get = $row['Value']; } } } if ($n==0) { $you = "INSERT INTO "; $you2 = $SQLtable; $you3 = " (Username, Value)"; $you = $you . $you2 .$you3; $you2 = ","; $you3 = ")"; $you4 = "'"; $you5 = " VALUES ("; $query = $you . $you5 . $you4. $user . $you4 . $you2 . $you4. $value. $you4. $you3; mysql_query($query); } echo "<br />"; echo "\n"; if ($act == "get") { echo $get; } if ($act == "set") { $you = "UPDATE "; $you2 = $SQLtable; $you3 = " SET Value = '"; $you = $you . $you2 .$you3 . $value; $you2 = "' WHERE Username = '"; $you3 = $user; $you4 = "'"; $query = $you . $you2 . $you3 . $you4; mysql_query($query); echo "Updated"; } } mysql_close($con); ?>do you have a .sql file of the database of scratch live? and a link to it?
If you look through the code, you will see some MySQL "CREATE TABLE" code:
Code:
CREATE TABLE Users ( Username varchar(20), Value varchar(20), );In phpMyAdmin click "SQL" or "Query" then run that code in the box and it should create the table you need.
did you read post #93?
Offline
What table name did you use?
Try adding the accent character before and after the table name: `scratchlive` ( not 'scratchlive' or "scratchlice" )
Offline
Magnie wrote:
What table name did you use?
Try adding the accent character before and after the table name: `scratchlive` ( not 'scratchlive' or "scratchlice" )
1. For the code, Users. For one of the first lines in scratch live php? Users again
2. its not working #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 ''Users'
(
Username varchar(20),
' at line 1
Do you have the code for the qwery?
edit: oh i frogot to add the ` but there is still an error after i add the `
Last edited by flashgocrazy (2011-11-28 21:29:18)
Offline
cocolover76 wrote:
Dominic1 wrote:
Also, for privacy reasons, the source code of ScratchChat will most likely NOT be released, as this would make it easy for people to hack into the systems.
Okay, if you don't want me and everyone else with Mac, Linux, Solaris, etc. to download it.
I only use mac, so I know. Unfortunately, if someone hacked in, they could majorly mess stuff up.
Offline
gbear605 wrote:
cocolover76 wrote:
Dominic1 wrote:
Also, for privacy reasons, the source code of ScratchChat will most likely NOT be released, as this would make it easy for people to hack into the systems.
Okay, if you don't want me and everyone else with Mac, Linux, Solaris, etc. to download it.
I only use mac, so I know. Unfortunately, if someone hacked in, they could majorly mess stuff up.
It's actually pretty easy to hack in, so you might as well release the code.
Offline
flashgocrazy wrote:
Magnie wrote:
What table name did you use?
Try adding the accent character before and after the table name: `scratchlive` ( not 'scratchlive' or "scratchlice" )1. For the code, Users. For one of the first lines in scratch live php? Users again
2. its not working #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 ''Users'
(
Username varchar(20),
' at line 1
Do you have the code for the qwery?
edit: oh i frogot to add the ` but there is still an error after i add the `
Can you give me the code of the entire query you put in?
Offline
Magnie wrote:
flashgocrazy wrote:
Magnie wrote:
What table name did you use?
Try adding the accent character before and after the table name: `scratchlive` ( not 'scratchlive' or "scratchlice" )1. For the code, Users. For one of the first lines in scratch live php? Users again
2. its not working #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 ''Users'
(
Username varchar(20),
' at line 1
Do you have the code for the qwery?
edit: oh i frogot to add the ` but there is still an error after i add the `Can you give me the code of the entire query you put in?
CREATE TABLE `Users`
(
Username varchar(20),
Value varchar(20),
);Offline