Jump to content
  • 0

Register account manually in SQL by inserting in the table


iankasai

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

Does registering account manually in SQL by inserting in the table causes some bugs?

 

additional info: when i started my server, i registered through sql, i inserted in the table. But after our control panel released, when u register in the control panel, the account ID started at 3000000.. Some players are having a problem in vote for points, while the others and i, are working fine.. I was thinking if that is the cause too..

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

Does registering account manually in SQL by inserting in the table causes some bugs?

 

Haven't encountered problems though. Inserted login accounts on the `login` table. The Vote4Point problems must be related on how you configured the CP you used, not Game Database related but Web Database related.  /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Does registering account manually in SQL by inserting in the table causes some bugs?

 

additional info: when i started my server, i registered through sql, i inserted in the table. But after our control panel released, when u register in the control panel, the account ID started at 3000000.. Some players are having a problem in vote for points, while the others and i, are working fine.. I was thinking if that is the cause too..

1. No 

 

Question : How did you register through your SQL? You specify the account id by yourself? account_id in the login table are in auto increment. so meaning even you leave blank the account_id column when inserting through SQL. It will give an account id. Did you get my point? Sorry for my bad english.

 

What is the vote for points you are using also?

Edited by Patskie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

Does registering account manually in SQL by inserting in the table causes some bugs?

 

additional info: when i started my server, i registered through sql, i inserted in the table. But after our control panel released, when u register in the control panel, the account ID started at 3000000.. Some players are having a problem in vote for points, while the others and i, are working fine.. I was thinking if that is the cause too..

1. No 

 

Question : How did you register through your SQL? You specify the account id by yourself? account_id in the login table are in auto increment. so meaning even you leave blank the account_id column when inserting through SQL. It will give an account id. Did you get my point? Sorry for my bad english.

 

What is the vote for points you are using also?

YES I SPECIFIED THE ACCOUNT ID by myself. I used the default starting account ID: 2000000

 

yes i get ur point.

 

I'm using Feefty vote for points..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

 

Does registering account manually in SQL by inserting in the table causes some bugs?

 

additional info: when i started my server, i registered through sql, i inserted in the table. But after our control panel released, when u register in the control panel, the account ID started at 3000000.. Some players are having a problem in vote for points, while the others and i, are working fine.. I was thinking if that is the cause too..

1. No 

 

Question : How did you register through your SQL? You specify the account id by yourself? account_id in the login table are in auto increment. so meaning even you leave blank the account_id column when inserting through SQL. It will give an account id. Did you get my point? Sorry for my bad english.

 

What is the vote for points you are using also?

YES I SPECIFIED THE ACCOUNT ID by myself. I used the default starting account ID: 2000000

 

yes i get ur point.

 

I'm using Feefty vote for points..

No need to specify the account_id when inserting manually in log in table because it is auto-increment. I haven't used feefty vote for points addons. Have you tried jaypee's vote for points?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

 

 

Does registering account manually in SQL by inserting in the table causes some bugs?

 

additional info: when i started my server, i registered through sql, i inserted in the table. But after our control panel released, when u register in the control panel, the account ID started at 3000000.. Some players are having a problem in vote for points, while the others and i, are working fine.. I was thinking if that is the cause too..

1. No 

 

Question : How did you register through your SQL? You specify the account id by yourself? account_id in the login table are in auto increment. so meaning even you leave blank the account_id column when inserting through SQL. It will give an account id. Did you get my point? Sorry for my bad english.

 

What is the vote for points you are using also?

YES I SPECIFIED THE ACCOUNT ID by myself. I used the default starting account ID: 2000000

 

yes i get ur point.

 

I'm using Feefty vote for points..

No need to specify the account_id when inserting manually in log in table because it is auto-increment. I haven't used feefty vote for points addons. Have you tried jaypee's vote for points?

yes i tried, but something was wrong I couldn't add voting sites.. any solution to that?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

1. Just import the SQL files located on schemas folder on your database.

2. Go to voteforpoints/modules/voteforpoins/index.php

 

Replace the code with this : 

 
<?php //A login is required
include ('function.php');$this->loginRequired();
//This will list the sites
$vp = Flux::config('FluxTables.Sites'); 
$vp_voter = Flux::config('FluxTables.Voters'); 
$serverLogDB = $server->loginDatabase;
$vp_voter = Flux::config('FluxTables.Voters'); 
$vp_logs = Flux::config('FluxTables.Logs');         
$serverObj = $server->connection;$sql = "SELECT site_id,site_name,address,points,blocking_time,banner,banner_url FROM {$server->loginDatabase}.{$vp}";
$sth = $server->connection->getStatement($sql);
$sth->execute();
$vp = $sth->fetchAll();
$account_idz = $session->account->account_id;
$current_time= date("Y-m-d G:i:s",time());
$ip_address = 0;if(Flux::config('IP_BLOCKING'))    
$ip_address = $_SERVER['REMOTE_ADDR'];        
$sql = "SELECT points FROM {$server->loginDatabase}.{$vp_voter} WHERE account_id=?";
$sth = $server->connection->getStatement($sql);$sth->execute(array($session->account->account_id));
$vp_voter = $sth->fetch();
$curr_points = $vp_voter->points;
function isBlock($account_idz,$site_id,$current_time,$ip_address,$serverLogDB,$vp_logs,$serverObj){    if($ip_address!=0)    {        
$sql = "SELECT `rtid`,`unblock_time`,`ip_address` FROM {$serverLogDB}.{$vp_logs} WHERE f_site_id=? AND unblock_time>? AND ip_address=? ORDER BY unblock_time ASC LIMIT 1";        
$sth = $serverObj->getStatement($sql);        
$sth->execute(array($site_id,$current_time,$ip_address));        
$ip_check = $sth->fetchAll();                
$diff_time = strtotime($ip_check[0]->unblock_time)-strtotime(date("Y-m-d G:i:s",time()));        
if(!empty($ip_check))            
return strtotime($ip_check[0]->unblock_time);    }        
$sql = "SELECT `unblock_time` FROM {$serverLogDB}.{$vp_logs} WHERE account_id=? AND f_site_id=?";        
$sth = $serverObj->getStatement($sql);        
$sth->execute(array($session->account->account_id,$site_id));        
$account_check = $sth->fetch();                
if(!empty($account_check))            
$diff_time = strtotime($account_check->unblock_time)-strtotime(date("Y-m-d G:i:s",time()));        
else            
$diff_time = 0;                    
if($diff_time>0)            
return strtotime($account_check->unblock_time);        
else            
return 0;    
return strtotime($account_check->unblock_time);}
?>
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

still not working dude..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

YES I SPECIFIED THE ACCOUNT ID by myself. I used the default starting account ID: 2000000

If you specified an account_id greater than the current AUTO_INCREMENT value, this will increase AUTO_INCREMENT to that new value +1.

You can change it back:

ALTER TABLE `login` AUTO_INCREMENT = 2000000;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...