Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Tazz
New Member
New Member



Joined: Mar 18, 2004
Posts: 10

PostPosted: Sun Dec 12, 2004 2:01 am Reply with quote

Not done much with xml. Working on a EQ2 roster script.

I am pulling the data from the xml fine, but not shure how to insert it into the database or sort it keeping the correct info in the correct rows.

I currently have it to where it lists it out like so:

Code:
  $txItem = $arItems[$i];

  $GuildID = ($txItem->xId);
  $GuildRank = ($txItem->xRank);
  $GuildName = ($txItem->xName);
  $GuildClass = ($txItem->xClass);
  $GuildLevel = ($txItem->xLevel);
  $GuildArtisanclass = ($txItem->xArtisanclass);
  $GuildArtisanlevel = ($txItem->xArtisanlevel);


I can then echo it out and keep it in the proper rows. But would like to make it so I can sort by $GuildRank or so on. Wouldnt bother me if I had to insert it into the database first then sort it, but still unsure how I can keep things with the same rows.

Any suggestions would be much appreciated.


Last edited by Tazz on Mon Dec 13, 2004 1:05 am; edited 1 time in total 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Dec 12, 2004 1:22 pm Reply with quote

I'm not understanding. Once you have the data pulled you just write a MySQL INSERT statment like you would any other data. You loop through the data and write to the database after you have pulled a complete row.
 
View user's profile Send private message
Tazz







PostPosted: Sun Dec 12, 2004 1:42 pm Reply with quote

I was not sure if it would insert the data in rows. I tried sorting it before echoing it on the page and it threw everything out of wack. I did throw an insert in instead of the echos and it does appear to stay consistant.

Was just trying to think things threw a little bit. Still walking on my sea legs so to speak, Thanks for the reply.

PS: I get this working would you be interested in checking the code for security issues?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©