mikosiko
Members-
Posts
1,327 -
Joined
-
Last visited
-
Days Won
1
Everything posted by mikosiko
-
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
-
sure... what about if you read in the MANUAL the description and functionality of the function move_uploaded_file() ???
-
Css 101.... wait... more basic than that http://bit.ly/TY1IM2
-
Congrats Barand, well deserved
-
Your function is receiving 2 parameters, and in your index.php you are calling it with 4.
-
you ignored my 3rd suggestion completely (well... the 2nd too, but that is not relevant to the issue)
-
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>
-
Logical Statement Always Returning False
mikosiko replied to Colton.Wagner's topic in PHP Coding Help
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 -
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
-
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
-
try creating a composite index on (artist, tittle) and run the EXPLAIN again to see if that helps a little
-
Use Php To Parse A File To Mysql (Newbie..way Newbie)
mikosiko replied to kat35601's topic in PHP Coding Help
^+1 one easy way : LOAD DATA INFILE -
post your exact EXPLAIN output (what you posted before is far from that)
-
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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. -
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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 -
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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 } -
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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() ?? -
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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"; -
Help With Sql Statement Returning Empty Records
mikosiko replied to mallen's topic in PHP Coding Help
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 -
Logical Statement Always Returning False
mikosiko replied to Colton.Wagner's topic in PHP Coding Help
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 -
+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
-
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
-
Help Please Error "unknown Column 'catagory' In 'where Clause"
mikosiko replied to kate_rose's topic in MySQL Help
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