Jump to content

Barand

Moderators
  • Posts

    24,573
  • Joined

  • Last visited

  • Days Won

    824

Everything posted by Barand

  1. One easy option is to create HTML or PDF files. Word will open those and you can save as DOCX
  2. Sorry, I am unable to do that, I have never read one. Just reference manuals and experimentation.
  3. Sorry, I copied and edited the wrong query SELECT c.name AS county_name , c.id AS county_id , c.population , group_concat(DISTINCT r.name separator '<br /> ') AS recruiter , group_concat(DISTINCT u.name separator '<br /> ') AS u_name FROM counties c INNER JOIN states s ON c.state_id = s.id LEFT JOIN recruiters r ON r.county_id = c.id LEFT JOIN universities u ON c.id = u.county_id WHERE c.state_id = $StateID GROUP BY c.name
  4. try SELECT c.name AS county_name , c.id AS county_id , c.population , group_concat(DISTINCT r.name separator '<br /> ') AS recruiter , group_concat(DISTINCT u.name separator '<br /> ') AS uname FROM counties c INNER JOIN states s ON c.state_id = s.id LEFT JOIN recruiters r ON r.county_id = c.id UNION RIGHT JOIN recruiters r ON r.county_id = c.id LEFT JOIN universities u ON r.county_id = u.county_id WHERE c.state_id = 5 GROUP BY c.name results +--------------------+-----------+-----------+ | region | region_id | parent_id | +--------------------+-----------+-----------+ | Caribbean | 1 | 0 | | Eastern Caribbean | 1 | 1 | | Southern Caribbean | 1 | 1 | | Western Caribbean | 1 | 1 | | South America | 4 | 0 | | Amazon River | 4 | 4 | +--------------------+-----------+-----------+
  5. What is the group table for when you have the region parent in the region table? Try SELECT reg_name as region , region_id , parent_id FROM clc_crz_regions WHERE parent_id=0 UNION SELECT r1.reg_name , r2.region_id , r1.parent_id FROM clc_crz_regions r1 INNER JOIN clc_crz_regions r2 ON r1.parent_id = r2.region_id WHERE r2.parent_id=0 ORDER BY region_id, parent_id, region +--------------------+-----------+-----------+ | region | region_id | parent_id | +--------------------+-----------+-----------+ | Caribbean | 1 | 0 | | Eastern Caribbean | 1 | 1 | | Southern Caribbean | 1 | 1 | | Western Caribbean | 1 | 1 | | South America | 4 | 0 | | Amazon River | 4 | 4 | +--------------------+-----------+-----------+
  6. I meant to use that in your earlier query SELECT c.name AS county_name , c.id AS county_id , c.population , group_concat(r.name separator '<br /> ') AS recruiter , group_concat(u.name separator '<br /> ') AS u_name FROM counties c INNER JOIN states s ON c.state_id = s.id LEFT JOIN recruiters r ON r.county_id = c.id LEFT JOIN universities u ON c.id = u.county_id WHERE c.state_id = $StateID GROUP BY c.name
  7. Easiest way is to store all in the category table. The parent id of of top-level categories will be NULL, in subcats it's the id of the parent category TABLE: articles TABLE: categories articleID +------ catID ---+ title | cat_name | content | parentCatID >--+ catID >-----+
  8. what if you LEFT JOIN universities u ON c.id = u.county_id
  9. unserializing once gave you a serialized string which you then unserialized to get the array. Looks like your original was serialized twice.
  10. Do you mean while($row = $result->fetch_assoc()){ $events[] = array( 'id' => $row['id'], 'title' => $row['event'], 'start' => $row['eventDate'] ); }
  11. You do it the same way you did in this post of yours 2 years ago http://forums.phpfreaks.com/topic/287395-help-with-login-script-phphtml/?do=findComment&comment=1474436
  12. Or strrchr $ipport = "2001:db8:a0b:12f0::1:25"; $end = strrchr($ipport, ':'); echo $end; //--> :25
  13. Make a better job of the presentation of your code then maybe someone will have a look at it.
  14. try using this to define the constant, instead of a class constant definition define('CERTIFICATE_CHAIN_PATH' , __DIR__ . '/gd_bundle-g2.crt');
  15. You could use a <datalist>..</datalist> <datalist id='timeoptions'> <option>1:00</option> <option>1:15</option> <option>1:30</option> <option>1:45</option> <option>2:00</option> <option>2:15</option> <option>2:30</option> </datalist> <input type="text" name="fromtime[]" value="" placeholder="From Time (hh:mm)" class="forminput" list="timeoptions" />
  16. $curl_response = curl_exec($curl); if ($curl_response === false) { trigger_error('cURL error: '.curl_error($curl), E_USER_ERROR); } echo $curl_response; curl_close($curl); result
  17. My data mysql> select * from states; +----+-------------+------------+ | id | name | capital | +----+-------------+------------+ | 1 | Connecticut | Hartford | | 2 | Maine | Augusta | | 3 | Vermont | Montpelier | +----+-------------+------------+ mysql> select * from counties; +----+----------+------------+------------+ | id | state_id | name | population | +----+----------+------------+------------+ | 1 | 3 | Bennington | 37125 | | 2 | 3 | Addison | 36821 | | 3 | 3 | Caledonia | 31227 | | 4 | 1 | Fairfield | 916829 | | 5 | 1 | Hartford | 894014 | | 6 | 2 | Aroostook | 71870 | | 7 | 2 | Cumberland | 281674 | +----+----------+------------+------------+ mysql> select * from recruiters; +----+-----------+---------+ | id | county_id | name | +----+-----------+---------+ | 1 | 1 | Anne | | 2 | 1 | Bernard | | 3 | 2 | Charlie | | 4 | 2 | Dianne | | 5 | 3 | Emma | | 6 | 4 | Fred | | 7 | 4 | George | | 8 | 6 | Henry | | 9 | 6 | Ian | | 10 | 6 | Jane | +----+-----------+---------+ query SELECT c.name , c.population , group_concat(r.name separator ', ') as recruiters FROM counties c INNER JOIN states s ON c.state_id = s.id LEFT JOIN recruiters r ON r.county_id = c.id WHERE c.state_id = 2 GROUP BY c.name results +------------+------------+------------------+ | name | population | recruiters | +------------+------------+------------------+ | Aroostook | 71870 | Henry, Ian, Jane | | Cumberland | 281674 | NULL | +------------+------------+------------------+
  18. Use placeholders for all the variables and not just two of them.
  19. Run this script <?php phpinfo(); ?> In the first part of the output look for the heading "Loaded Configuration File". That tells you the php.ini file that is being used and its location. That is the file you need to edit.
  20. Where did you get your data? Your coordinates for airport CRL place it in the middle of the English Channel
  21. what about mysql> show variables like 'sql_big_sel%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | sql_big_selects | ON | +-----------------+-------+ If it is OFF, try running the query "SET SQL_BIG_SELECTS = 1" before running your query.
  22. And run this query (in phpMyAdmin or similar) and see what the result is SHOW VARIABLES LIKE 'max_join%'; EG mysql> SHOW VARIABLES LIKE 'max_join%'; +---------------+----------------------+ | Variable_name | Value | +---------------+----------------------+ | max_join_size | 18446744073709551615 | +---------------+----------------------+
  23. I gave you the combined query. Can you attach an SQL dump of those two tables?
  24. echo $Arr['scan_results']['scan_details']['F-prot']['scan_result_i'];
×
×
  • 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.