Jump to content

Barand

Moderators
  • Posts

    24,603
  • Joined

  • Last visited

  • Days Won

    830

Everything posted by Barand

  1. The last line of the query looks odd ...ORDER BY sala_ocupacao.`id_ocup`id_ocup;'
  2. your code to create the array $car = array(); $car["vw"] = array( "name" => "volkswagen"); $car["tyta"] = array( "name" => "toyota"); will give you Array ( [vw] => Array ( [name] => volkswagen ) [tyta] => Array ( [name] => toyota ) ) It would be better and simpler to $car = array(); $car["vw"] = "volkswagen"; $car["tyta"] = "toyota"; giving Array ( [vw] => volkswagen [tyta] => toyota ) But why not just give them a dropdown menu of valid types to select from
  3. I was thinking Imperial Purple, but then Gold.
  4. No, you don't want it to look like that. You should not use "SELECT * " and numeric values should not be quoted. What is the relationship between "start" and "end" that you pass to your script via the URL and "bidStatus" and "department"
  5. The last insert id is only available for the current connection. You need to get it and store it ($_SESSION) as soon as possible after the insert. When the script ends the connection closes automatically
  6. Change your single quotes to double quotes and vice versa
  7. Looks like you'll be losing your blue badge. What colour is the "God" badge?
  8. You are selecting four columns but show only three in the output image ??? I don't know your data structure or content so can only guess, but would a LEFT JOIN instead of INNER JOIN on `req_material_tempo` give the desired result?
  9. On reading this post I was considering embarking on a natsort function with a custom collation sequence but chickened out. I decided I could live with natsort()'s default. I wish gnomeplanet luck in creating one. If they ever bring back the competitions, this would be a good contender
  10. Have you tried natsort
  11. Try stepping through the relevant JS code in your browsers debugger and try to find where an "undefined" value is being sent to the ajax call.
  12. Are you using javascript to pass the value?
  13. Is the div visible?
  14. I'm guessing you could also do it using SVG text.
  15. You removed the echo. It used to be echo json_encode($response); So it should still echo $response;
  16. Your PHP doesn't echo anything to go into the response (unless you have a query error).
  17. See my previous reply. AFAIK CSS doesn't support outline font-style so you may need to specify an outline font.
  18. If "Wno" in your table is the week number then use "... WHERE Wno BETWEEN 1 AND 13" in your query to get the first quarter and not rely on LIMIT
  19. Give us a clue - what exactly is reported as being "undefined"?
  20. You can't in PHP. You use CSS on the client. EG <html>> <head> <style type="text/css"> body { font-size: 24pt; } </style> </head> <body> <?php echo "Hello World";?> </body> </html>
  21. Why json_encode plain text? As you are already using jquery, why use getElementById() and not $('#ajaxDivOk').css("display", "block"); $('#ajaxDivOk').html("Registo(s) gravado(s) com sucesso");
  22. I can't see a reason for 1000+ writes in the code posted. Is that code inside another loop?
  23. What does $hora (or $_POST['hora']) contain?
  24. try $a = [1,2,3,4,5,6,7,8,9,10]; $b = [1,4,7,9,10]; $c = array_fill_keys(array_keys(array_diff($a,$b)),null) + $a; ksort($c); result: $c = Array ( [0] => 1 [1] => [2] => [3] => 4 [4] => [5] => [6] => 7 [7] => [8] => 9 [9] => 10 )
  25. Do you mean you can't access the keys of the outer array? $someArray = json_decode($newObject, true); foreach($someArray as $obj=>$value){ foreach ($value as $secondKey){ echo $obj . " " . $secondKey . "<br>"; } } gives firstObject red secondObject blue
×
×
  • 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.