( sdonate) 1067 Invalid default value for 'expiretime' in /var/www/donate/install.php:
up vote
0
down vote
favorite
Error when running /install.php
[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 'rn endcommands TEXT,rn transactionid TEXT,rn ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n thrown in /var/www/donate/install.php on line 258
Lines 239-260 of install.php:
if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);
}
software: sdonate.com
not sure how to fix it, documentation shows no solutions.
what would be a solution?
php mysql
add a comment |
up vote
0
down vote
favorite
Error when running /install.php
[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 'rn endcommands TEXT,rn transactionid TEXT,rn ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n thrown in /var/www/donate/install.php on line 258
Lines 239-260 of install.php:
if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);
}
software: sdonate.com
not sure how to fix it, documentation shows no solutions.
what would be a solution?
php mysql
I would make the cause for the error,an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
– Alex
Nov 11 at 2:23
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Error when running /install.php
[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 'rn endcommands TEXT,rn transactionid TEXT,rn ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n thrown in /var/www/donate/install.php on line 258
Lines 239-260 of install.php:
if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);
}
software: sdonate.com
not sure how to fix it, documentation shows no solutions.
what would be a solution?
php mysql
Error when running /install.php
[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 'rn endcommands TEXT,rn transactionid TEXT,rn ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n thrown in /var/www/donate/install.php on line 258
Lines 239-260 of install.php:
if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);
}
software: sdonate.com
not sure how to fix it, documentation shows no solutions.
what would be a solution?
php mysql
php mysql
edited Nov 11 at 1:55
Shadow
25.3k92742
25.3k92742
asked Nov 11 at 1:48
Alex EPIC
33
33
I would make the cause for the error,an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
– Alex
Nov 11 at 2:23
add a comment |
I would make the cause for the error,an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
– Alex
Nov 11 at 2:23
I would make the cause for the error,
an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.– Alex
Nov 11 at 2:23
I would make the cause for the error,
an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.– Alex
Nov 11 at 2:23
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
expiretime
field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
wellexpiretime INT(11),
fixed it.
– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
add a comment |
up vote
0
down vote
got it, just had to change it to:
expiretime INT(11),
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
expiretime
field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
wellexpiretime INT(11),
fixed it.
– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
add a comment |
up vote
0
down vote
accepted
expiretime
field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
wellexpiretime INT(11),
fixed it.
– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
expiretime
field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).
expiretime
field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).
answered Nov 11 at 1:55
Shadow
25.3k92742
25.3k92742
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
wellexpiretime INT(11),
fixed it.
– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
add a comment |
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
wellexpiretime INT(11),
fixed it.
– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06
well
expiretime INT(11),
fixed it.– Alex EPIC
Nov 11 at 2:07
well
expiretime INT(11),
fixed it.– Alex EPIC
Nov 11 at 2:07
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26
add a comment |
up vote
0
down vote
got it, just had to change it to:
expiretime INT(11),
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
add a comment |
up vote
0
down vote
got it, just had to change it to:
expiretime INT(11),
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
add a comment |
up vote
0
down vote
up vote
0
down vote
got it, just had to change it to:
expiretime INT(11),
got it, just had to change it to:
expiretime INT(11),
answered Nov 11 at 2:06
Alex EPIC
33
33
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
add a comment |
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245154%2fsdonate-1067-invalid-default-value-for-expiretime-in-var-www-donate-instal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I would make the cause for the error,
an error in your SQL syntax
, more prominently displayed, so whoever's answering this can see what type of error they need to look for.– Alex
Nov 11 at 2:23