Jump to content

PugJr

Members
  • Posts

    673
  • Joined

  • Last visited

    Never

Posts posted by PugJr

  1. Now below would withdraw all data from table and repeat echoing it until it ran out of rows. Now how would I do it so it arranges numerical (assuming $var is always a number). If I do a bad job at explaining like this is what would normally happen:

     

    Assuming this is my table content:

     

    ID var

    1  3

    2 7

    3 2

    4 5

     

    I would get with what I currently have:

     

    3

    7

    2

    5

     

    But which I want is:

     

    2

    3

    5

    7

     

    I would prefer if it would be possible to get a hint on how to solve this or a guide. I'd prefer not having the direct answer as then I learn little. Thank you.

     

     

    $query = "SELECT * FROM table" or die();

     

    $result = mysql_query($query) or die();

     

     

    while($row = mysql_fetch_array($result)){

     

     

     

    $var = $row['var'];

     

    echo "$var <br>";

    }

     

  2. I was in quite the same situation as you in I for one would not recommend downloading a pre-built code package. You get confused as you don't really understand what any of it means. I wasted months just trying to figure it out and then I went to a toturial (Not sure if i'm allowed to mention links) and I understood most of it in a couple weeks.

     

    Thats just for me though, we all are different.

  3. Is there a way to disable jscript? So far my website has never used any jscript so if I was to disable it all together would that fix it?

     

     

    EDIT: And by disabling it I don't mean by client side but like server side?

     

     

    Edit: Oh wait a minute, what am I saying? All jscript is, is something on the webpage that the client reads, so how could you disable that?

  4. Well I'm not exactly a professional or anything but I don't think this can be done through PHP. PHP is all server side from what I last recall meaning that you couldn't do that.

     

    On the other hand Jscript could do that I think.

     

    Do correct me if I'm wrong though about PHP being client side only.

  5. $result = mysql_query("SELECT * FROM example WHERE id='$id'")

     

    Okay that you could say is a rather generic mysql_query. My question is, how would you do a range on that? Like $id is 3 to 7 and it selects each indiviual one. How would one do that? Or if there is another way to do along that would be great but right now I have like 4 queries for each ID and I'm sure there has to be another way.

     

    Thanks.

     

  6. Is it possible with an I.P. to get the exact location?

     

    Well, I was debating with one of my buddies and he sure was bent on thinking that with an I.P. (un-proxy) that you can get the exact location, the exact house for that matter where one lives. I always thought you could get the general area such as the city but not the exact place. Could anyone clarify this for me?

     

    Oh and I mean more than 10% of the time. Once in awhile you might get a lucky strike with it but as far as the exact location almost 100% of the time goes.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.