Jump to content

mikosiko

Members
  • Posts

    1,327
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mikosiko

  1. and... aggr_nr is not the same as $aggr_nr aggr_nr = $_REQUEST['list_nr_01'].$_REQUEST['list_nr_02'].$_REQUEST['list_nr_03']; $sql="SELECT v.id FROM vers_einl_aggregatenumber AS v WHERE v.aggr_nr = '".$aggr_nr."'";//missing Quotes
  2. As DavidAM mentioned, if your file has the fields well delimited, like a CSV I will personally prefer to use LOAD DATA INFILE statement instead of manipulate the file with PHP, you should get better performance.
  3. sure... what about if you read in the MANUAL the description and functionality of the function move_uploaded_file() ???
  4. Css 101.... wait... more basic than that http://bit.ly/TY1IM2
  5. Congrats Barand, well deserved
  6. Your function is receiving 2 parameters, and in your index.php you are calling it with 4.
  7. you ignored my 3rd suggestion completely (well... the 2nd too, but that is not relevant to the issue)
  8. In addition to Barand point, in your first SELECT you should: - Fix the evident syntax errors around the `mobile` field - Even when is not part of any error, the usage of alias is unnecessary and doesn't make sense in this case. - because you are trying to get the users that HAVE NOT log-in in certain time frame you must use a LEFT JOIN and filter the record that has entries.time NULL (or 0000-00-00) - finally you must use WHERE DATE_FORMAT(entries.time, '%Y-%m-%d') BETWEEN <rest of the sentence here>
  9. In benefit of others reading this... The solution provided for Ignace of course works, and did solve the original issue that you had (an undefined variable $row), now if after solve that issue your expression still evaluating to FALSE could means that, either your previous query is not returning results (and you are not validating that in your code) or the comparison between your stored password and the posted one is evaluating to false because they doesn't match. your original code was (now with Ignace suggestion in place) // Verify Current Password, Validity of Email, and that Passwords Match. $query =mysql_query("SELECT * FROM adminusers WHERE Username='$_SESSION[username]'"); if(($row = mysql_fetch_array($query)) && ($row['Password'] == $encrypt->password($_POST['Current_Password']))){ suggestions: - Validate that your raw query is correct. (separate it from the mysql_query() and echo it first). - Validate that the query is returning values and not evaluating to FALSE. - Validate that the stored password match the Posted password after your call your $encrypt->password() method
  10. interestingly enough seems that you "forgot" to mention in every single previous post that your query was using the "domain" column too in the where clause, neither you used that column in the previous EXPLAINS, therefore the EXPLAIN that you are posting now is completely different than before... take out the GROUP BY in the query2... maybe you intent was to use ORDER BY instead... good luck
  11. yes... and when post your explain results post the execution time also. I will suggest also to post more of the relevant code around those queries, maybe something else (in addition to the aggregate function) is contributing to the slowliness
  12. try creating a composite index on (artist, tittle) and run the EXPLAIN again to see if that helps a little
  13. ^+1 one easy way : LOAD DATA INFILE
  14. post your exact EXPLAIN output (what you posted before is far from that)
  15. you still having this line in the query WHERE cty.has_state = 1 remove it ... if that doesn't work you need top post a REAL example of the data of each table and the expected results.
  16. try using a LEFT JOIN in this 2 lines, and post back your results JOIN wp_agent_states AS states ON states.id = locs.state_id JOIN wp_agent_countries AS cty ON locs.country_id = cty.id
  17. general idea: .... .... $res = $wpdb->get_results($sql, ARRAY_A); $prev_state = ''; foreach($res as $r){ if ($prev_state != $r['state_name']) { // Print the state echo "<h5>". $r['state_name'] . "</h5>"; $prev_state = $r['state_name']; } // Rest of your code }
  18. did you run the query outside of PHP (in whatever tool that you use... PhpMyadmin, Workwench, etc)... did produce results?.. that is the first thing to check. secondly, where in your code are you calling the function displayFrontAgents() ??
  19. did you understand my previous answer?... doesn't look like... and just in case: test this (no tested on my side)... and see if you can came up with some new ideas: "SELECT cty.id, cty.name, states.id, states.state_name, `agent`.`company_name`, `agent`.`address` , `agent`.`city` , `agent`.`zip` , `agent`.`phone` , `agent`.`fax` , `agent`.`email` , `agent`.`website` , `agent`.`territory` , `agent`.`contact_name`, `agent`.`country`, `agent`.`state` FROM wp_find_agent AS agent JOIN agent_locations AS locs ON agent.id = locs.agent_id JOIN wp_agent_states AS states ON states.id = locs.state_id JOIN agent_countires AS cty ON locs.country_id = cty.id WHERE cty.has_state = 1 ORDER BY cty.name, states.state_name ASC";
  20. change your logic.... running queries in loops is generally a bad idea... in your case seems that you can use just ONE query (for all the involved tables) using JOIN's instead of LEFT JOINS... after that is just a matter of logic to display the data properly
  21. if($row = mysql_fetch_array($query) && ($row['Password'] == $encrypt->password($_POST['Current_Password']))) I could bet that you are getting a NOTICE message in this line telling you "Notice: Undefined variable row in.....", and hence your IF is evaluating to FALSE
  22. +1 ... and unless you are using an old PHP version you should know that ereg has been already deprecated http://php.net/manual/en/function.ereg.php read the Notes for alternatives
  23. looking this post and the other related one, is easy to see that your code is incomplete and partially wrong... go to this website http://pivottrading.50webs.com/pivot/pivot/gann.html and download the help document right there in the table ("Help Document")... read it fully and you should be able to figure out what part of the logic you are missing just looking (and trying to understand the examples)... last page is a HUGE hint. good luck
  24. wild guess, but.... In your table your fields are called $name, $playlist_url and $catagory or you just typed it in that way by mistake? it seems to confirm my guess
  25. use mysql SUM() function http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_sum and if that doesn't help... a practical example http://www.tizag.com/mysqlTutorial/mysqlsum.php
×
×
  • 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.