Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited


About aschk

Profile Information

  • Gender
    Not Telling

aschk's Achievements


Newbie (1/5)



  1. You can't stream images to an image tag without providing some form of timeout refresh...
  2. Why would you want the date to be unique? (as you can see it's giving you an error at the minute).
  3. Is it me or are you inserting $query into $query several times?
  4. Then you're not getting an error... What is being written to the table? Because I suspect the problem is that you're expecting 10 values and only getting 1. Put this at the bottom of your script. <?php echo $value; ?>
  5. In pseudocode... if(agg==1) { $color = blue } elseif(pseudo == 1){ $color = green } elseif(agg == 0 AND pseudo == 0){ $color = red }
  6. Indeed, MySQL interprets anything enclosed by single quote (') as a literal. Thus you weren't actually supplying field names, merely supply strings which happened to contain the name of the field, and what was actually happening would have been that it was doing a comparison, e.g. 'kind_ntf' = '$IDntfK' => would be false So you were in fact probably doing: INSERT INTO notifications SET false, false, false, false, false, false, false Hope that clarifies it for you...
  7. Was that field created by MSSQL? i.e. a custom datatype? Because that's what it appears to be. If so, you will have to create a trigger (in MySQL) to generate this, or (better option) get PHP to generate an ID along the lines of what you were getting before, and insert that into the table.
  8. session_id() merely represents the cookie value for the PHP session identifier. As neil said, "in what way?" would you envisage using session_id() as a security measure? It is already partly a security measure in that the session will correlate to whatever identifier comes from the session_id()...
  9. "Thanks for the suggestion but the value and text must remain different." - why? If you need the text then you might as well make the value and text the same. What could you possibly be using the text for where the value isn't a more pertinent piece of information?
  10. Indeed... You can't have function names the same as PHP keywords. This also applies to "public", "protected", "count", "foreach"... etc. So rename your function to myprivate() or xprivate() or something other than just private()
  11. Yes, because each time you iterate over $totalsx you're getting a copy of $totals, which you are then editing. You're not getting a reference to the internal $totalsx item. Thus you have 2 options. Set it via reference, or via full array path. Both are supplied below: By reference <?php foreach ($totalsx as $key =>&$totals ){ $totals['total'] = "Changed value"; } <?php foreach ($totalsx as $key =>$totals ){ $totalsx[$key]['total'] = "Changed value"; }
  12. After each request you need to update your cookie info, and maintain it, failure to do so could cause a "logout" if the session identifier changes. Are you sure your cookie jar/file is being written correctly?
  13. Are you getting an error or just no results? If the latter (no results) then I suggest you look at what data you are expecting. Run the following with a static "id" value directly in MySQL to see what results you are getting. SELECT * FROM villages_en28 WHERE player = '< PLACE ID HERE >' AND x BETWEEN 400 AND 450 AND y BETWEEN 400 and 450 If you get no results examine why the data doesn't match up. I suspect because there is no player with x and y between those values. Also consider bracketing your SQL for better clarity, e.g. ... AND (x BETWEEN 400 AND 500) AND ...
  14. What information do you want to store? That is your answer
  • 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.