Jump to content

Usarjjaco

Members
  • Content Count

    127
  • Joined

  • Last visited

Everything posted by Usarjjaco

  1. Justsome, So theoretically, this should work? $FirstVariable = mysql_query("SELECT * FROM blah"); while($FirstWhile = mysql_fetch_array($FirstVariable)) { $SecondVariable = mysql_query("SELECT * FROM blah2 WHERE somecolumn = {$FirstWhile[othercolumn]}"); while($SecondVariable = mysql_fetch_array($SecondVariable)) { //More Code } //End Of Original While } I have to revisit my script today and get it working, but just wanted to verify that this should be completely feasible.
  2. To prevent from opening a second topic, is it possible to fetch an array with an array value? EG: A "While" statement queries array #1 We use one of the array values from Array #1 to select the group for array # 2 in a select statement A "While" statement queries array #2 basically I'm trying to updating two tables with one script, and I thought this would be possible, but I'm not getting the values from array # 2 to come through.
  3. Followed your few pointers, and got everything working. I didn't quote the (foodstored) because that was a int value. Other than that, all good, so thank you!
  4. justsomeguy, I took a stab at it in hopes it would better show you guys what I'm looking for, so here it is, and obviously, it's not working, which means I'm missing somehting (I'm thinking it has something to do with looping through each result, though I'm not sure how to implement it here...) //Select All Supply Depots$HQR = mysql_query("SELECT * FROM buildingso");//While We Are Fetching The Rows Associated With THe HQ's....while($HQROW = mysql_fetch_assoc($HQR)) { //Getting Quantities Per Person Based On Setting (This is the amount of supplies to distribute to each person based on the
  5. I guess what I'm missing is that I don't know how to run through one row at a time, and update based on the settings for that individual row?
  6. birbal, Thanks for the timely response. I just am not sure how JOIN would perform the task I need to do. I can see it for putting the information together, but the fact remains that I need to do something like supplydepot1 gives 10 supplies to id 1 2 and 10supplydepot2 gives 15 supplies to id 18 11 and 4supply depot3 gives 50 supplies to id 4 8 and 20 Since none of them are giving the same amount to the same ID's, I'm not seeing how join would work here, maybe I'm missing something? Thanks!
  7. Hello Everyone, I just wanted to drop in here and ask a couple questions of the PHP & SQL experts here. I've done work with the basics of SQL / PHP and ChronJob integration. However, I'm now on to trying to perform something a little more complex, and I'm banging my head a little bit on how exactly to get this done. In this I'm going to be using 2 tables, one we'll call Supply, another we'll call Distribution. A user (this is a browser based game), needs to elect to give X amount of supply to X member(s). The supply table contains the amount of supplies in each "Supply Depot". Basically
  8. Hello Everyone, Just wanting to know how to parse XML from an email automatically when it comes in, and then have it place that information into a SQL database. It sounds simple enough, but I so far haven't been able to find the right guide that's made it click for me. Any help would be appreciated, or even a small sample piece with 1 or 2 XML elements and the process used. Thanks in advance!
  9. justsomeguy, Seriously I want to send you a warm thank you and a +1. That was exactly what was needed, and for you to be able to extricate that from the garble that I placed above is truly above par. Thanks. Now, just so I don't fall victim to easy syndrome, I'm going to go reference what you've wrote and figure this out on my own as well. Thanks again!
  10. Hello Everyone,Been awhile since I've meandered into the forums on here, but I'm banging my head against a wall trying to figure this one out.Set Up: I have 2 tables in a SQL database. One lists whether a person is a friend with another person. The second is an Activity table that lists what someone posts as a status update.Goal: I need to be able to display not only a users own status updates, but updates that any of their "friends" have posted.Right now I've only been able to pull the persons own feed with a simple query, and I'm wondering how I would go about pulling all feeds from anyone t
  11. I'll throw up a post in the SQL forums, I am using PHPmyAdmin for the Table creation, so I don't have the SQL verbage in front of me.
  12. Niche, Both tables are in the same database, just different tables. Basically the "Activity" table will list all actions a user performs, and all the times they post on their own page or someone elses (similar to social networking), the "Friends" table lists the USER ID's of the sender and receiver, as well as if the friendship is active. I'm looking for a way that the Active friendsships will be able to see eachother's activity on their own home page. There is a third table which holds all the users and their personal data, so I'm just looking at how I pull information from Activity based on
  13. Hello Everyone, Been awhile since I've meandered into the PHP forums on here, but I'm banging my head against a wall trying to figure this one out. Set Up: I have 2 tables in a SQL database. One lists whether a person is a friend with another person. The second is an Activity table that lists what someone posts as a status update. Goal: I need to be able to display not only a users own status updates, but updates that any of their "friends" have posted. Right now I've only been able to pull the persons own feed with a simple query, and I'm wondering how I would go about pulling all feeds from
  14. Boen, Ok just re-read our thread here. Only question I have is how do I pass the javascript variable (Which is a link to the source file) from the .js page to the .php page? Once I get it to the php page I have a rough request script wrote in PHP, and then obviously parse the response into the DB, so I'm just missing how to pass the Javascript variable to the PHP page.
  15. Back again. I've made progress from last week. I now have the encoding.com section working properly, but could use some help on my javascript/xml interaction to make the vid.ly portion happen. Basically the URL that I need to send to vid.ly in xml format is stored in the javascript variable "mediainfo" .... So my round of questions today are: A) How can I send a simple javascript ran XML info to vid.ly, with the following parameters: <?xml version="1.0"?><query><!-- Main fields --><userid></userid><userkey></userkey><action>AddMedia</action
  16. Boen, Yes I thought it was a bit complex as well. So basically have a javascript check for when upload is complete, and when it is finished, have that run the HTTP request to fileinfo.php with the SID, and that will return a result that I can then send to vid.ly ? Lastly, if the above is correct, is all of those able to be done fluidly so that all the end user sees is "Uploading..." and then "Upload Complete.."
  17. Boen, Thank you for the prompt response. Although I will admit, a bit of that still looks foreign to me. As far as the PHP script on encoding.com, I am using a different script that they have provided, http://www.encoding.com/how_can_i_use_your_php_uploader_tool <--- That is the one I'm currently using. I feel really dense right now on this, as I'm pretty sure this script provides me with the link I need to send to vid.ly, I just don't know how to send it to them, and then get the final url back to put into my database.
  18. Hello Everyone, Been awhile since I've visited, and once again I've delved into another wonderous endeavor. This is my first encounter with XML, so I'm looking for some pointers. First off, I will start with what I'm trying to accomplish. 1) The site I'm working on allows users to upload videos, the video upon upload is sent to an encoding server. I then need to grab the xml information from the encoding server and send it to the storage server, and then grab it from the storage server to put it into a mysql database on the site server so that the video is placed under the appropriate user. Th
  19. Many thanks! It's always the little ones eh? ... My apologies for bringing such a petty thread to light... I suppose I had just stared at it too long
  20. Deirdre.Will work on a link. The problem is almost certainly in the Javascript. In My guess of narrowing it down it seems like the second onchange located here: echo "<select name='model' onchange=\"reload3(this.form)\"><option value='AllModels'>AllModels</option>";while($modelsearch = mysql_fetch_array($makecheck)) {if($modelsearch['Model']==@$Model){echo "<option selected value='$modelsearch[Model]'>$modelsearch[Model]</option>"."<BR>";}else{echo "<option value='$modelsearch[Model]'>$modelsearch[Model]</option>";}}echo "</select><br&
  21. Hello Everyone,Been awhile since I've been around but I'm back again, this time hoping to get some insight from the Javascript Guru's out there. I'm just starting to get into it and I have a decent grasp on it but this most recent roadblock has me at a loss... so I'm calling in some back up.The Concept: Multiple Drop down form, with each drop down dynamically altering what the next one will show using PHP. This I have been able to do from drop down 1 to drop down 2, with a successful page reload using the onselect function. However when I try to run the same function (with a different name of
  22. Quick bump for my above post. Anyone have an idea?
  23. The latter of the two. I seem to be able to get the results to print on the screen, but how do I convert those results ... I'm guessing something with making a variable for them and then storing the variables... but the print out using the name above prints both the Category (like ownerID:) as well as result (020847149) ... So what I need to do is get it to store in a table column of ownerID, but only store the ID # .. if that makes sense
  24. I have read thru them but still feeling a little daft to be honest. I'm attempting to use SimpleXML. I can get it to pull all of the data, but then translating that into a format that I can store into a DB is proving harder than expected.<?php$number = 602236694;$idnum = 1904604;$apiKey = ZYU0bWwW7zM3uC0zfy8Ct2umWMSwKHr078Xvzr5fqVKXgO0MVBzpGGHiv5b4OCme;$xml_feed_url = 'http://api.eve-online.com/char/WalletJournal.xml.aspx?characterID=' . $number . '&userID=' . $idnum . '&apiKey=' . $apiKey;$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $xml_feed_url);curl_setopt($ch, CURLOPT_HEADER
  25. Certainly.This is what the journal return looks like: <eveapi version="2"> <currentTime>2008-08-22 12:00:16</currentTime> <result> <rowset name="entries" key="refID" columns="date,refID,refTypeID,ownerName1,ownerID1,ownerName2,ownerID2,argName1,argID1,amount,balance,reason, taxReceiverID, taxAmount"> <row date="2008-08-22 03:36:00" refID="1578932679" refTypeID="54" ownerName1="corpslave" ownerID1="150337897" ownerName2="Secure Commerce Commission" ownerID2="1000132" argName1="" argID1="0" amount="-8396.99" balance="576336941.61" reason="" taxRecei
×
×
  • Create New...