Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Xploder

    Temp Row

    well I did this: $query = "SELECT * FROM map WHERE id>0 ORDER BY id"; $result = mysql_query($query) or die(mysql_error()); while ($fetched = mysql_fetch_assoc($result)){ echo $fetched['land'] } I don't really need order by id...
  2. Xploder

    Temp Row

    oh, nevermind I fugured it out.
  3. Xploder

    Temp Row

    for ($i=0; $i<count($row); $i++) { echo $row[$i].", "; } It doesn't work because in a table such as above when $i is 1 it gets the value from the table, but then $i is 2 it won't get another row with a value of 1. Does MySQL not have a function to get all the values from the 'land' column?
  4. Xploder

    Temp Row

    hmm, It doesn't work. // works, but only if i values don't repeat in the table, // if they do, any other occurance of it is ignored. for ($i=0; $i<count($row); $i++) { echo $row[$i]."<br>"; } // works only for values of 1 in the table even if they // repeat. for ($i=0; $i<count($row)...
  5. Xploder

    Temp Row

    no that doesn't work cause I could have repeated $i values.
  6. Xploder

    Temp Row

    How do I display all the values in a table in order from top to bottom, one after the other? So fahr It only does it with specific values: $result = mysql_query("SELECT * FROM map"); $row = mysql_fetch_row($result); echo $row["1"]; how do I siplify it to any values, just read them out?
  7. Xploder

    Recording Multiple Values

    Ok, I got it to work using steven290's methond, thanks again.
  8. Xploder

    Recording Multiple Values

    ok thanks I'll try that out.
  9. Xploder

    Recording Multiple Values

    TonyGroves, I'll make a new table for every iteam. But you can buy an iteam twice, even with a different value, so how do I record that? I'm making a webbased game where you can buy land, each piece of land has a different value from 1-255, now when you buy land I want it to add the lands value...
  10. Xploder

    Recording Multiple Values

    So I need to use the SET datatype? So after incrementing the length how would I add in a value? I'll try to explain a bit more: I don't clearly know yet how MySQL works but in other programming laguages I can create a flexible 1D array with an inicial length of 1 and then increase the length of...
  11. Xploder

    Recording Multiple Values

    Hi, I'm trying to save as many integer values as possible for any user into a table. Ex: Fist the user starts out with no additional values other than their name and password, and the iteam field is blank. And then if the user buys something it should record that into the iteam field, and when...

Part and Inventory Search

Back
Top