Jump to content
  • 0

Query Sql (Copy a Table)


Question

Posted (edited)

Why this command don't work?
 

query_sql "INSERT INTO char_store (`char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`,`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`homun_id`,`elemental_id`,`hair`,`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`robe`,`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`,`partner_id`,`online`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`moves`,`unban_time`) SELECT char_id,account_id,char_num,name,class,base_level,job_level,base_exp,job_ex,zeny,str,agi,vit,int,dex,luk,max_hp,hp,max_sp,sp,status_point,skill_point,option,karma,manner,party_id,guild_id,pet_id,homun_id,elemental_id,hair,hair_color,clothes_color,weapon,shield,head_top,head_mid,head_bottom,robe,last_map,last_x,last_y,save_map,save_x,save_y,partner_id,online,father,mother,child,fame,rename,delete_date,moves,unban_time FROM char WHERE `char_id`='"+getcharid(0)+"'";


I want copy all values of a player from table char to another called char_store, buts it's not working, so how can I?


Never mind, I already figure out

Edited by Zell

2 answers to this question

Recommended Posts

Posted

You should have the same number of column in the 2 tables

insert into `charlog` select * from `char` where `char_id` = 150000

EDIT : you already solved it, forget it^^

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...