On the first line of your file with the error, type 'use strict' followed by a newline. That should fix it. Some stuff in Javascript is only supported if you use strict mode.

Yes it does.

(function($) {

    // Code

})(jQuery);

simply defines an anonymous function and executes it right away, passing it jQuery as argument for $. You can put everything inside there.

I know, that's why I posted the solution above. Look at it again ;). Do you see a document.ready anywhere?

JOIN works if tables have different column names.

Example:

SELECT table_a.name, table_b.username FROM table_a JOIN table_b ON table_a.user_id = table_b.user_id WHERE table_a.user_id = 1

In the ON part of the query you tell the query which column in the first table matches the which column in the second table.

commented: +1 +15
commented: +1 +13

Why don't you use a JOIN? :)

commented: thnks for reply does join work if have table having some columns different names.can you give link how to use it +0

"Have you tried turning it off and on again?"

Kidding, but seriously, if this is a new installation, just reinstall and it will probably fix your problems.

You could place your functions inside an anonymous functions like so:

(function($) {

    $('#fancy_jquery_element').doFancyStuff();

})(jQuery);

Mate, do you have any idea what you are doing at all? :P What is is that you are trying to do? Are you trying to get an array of unique phone numbers or are you trying to output a comma separated list? Because if it is the latter, the only thing you'd need is echo implode(',', $_POST['numbers']);.

I only included the PHP to remove the duplicate numbers. You will have to print them yourself ;).

Ok because I do not fully understand from which directory you are calling your scripts, let's make clear we're on the same line here :).

So let's say you have directory C:\wamp\www\x. In x, you have src\autoload.php, i.e. C:\wamp\www\x\src\autoload.php. So when you are now inside directory x in your terminal, calling phpunit --bootstrap src/autoload.php tests/MoneyTest directs to folder src in your current folder, and to autoload.php in the src folder. Is this what you are trying, and is this where you are getting your "autoload.php cannot be opened" message?

Your code with comment:

$myarray = array();
$myarray['numbers']=$_POST['numbers'];
foreach($myarray as $num){
       $numbers=$num; // You aren't creating an array here. You are giving $numbers the value of the CURRENT number in the loop. PLUS your numbers are stored in $myarray['numbers'], not in $myarray ;).
}
$unique = array_unique($numbers); 
$output=implode("<br />",$unique);

What it should be:

// Assign $_POST['numbers'] to $numbers if it exists, otherwise make it an empty array.
$numbers = !empty($_POST['numbers']) ? $_POST['numbers'] : array();

// Output the result.
$output = implode('<br>', array_unique($numbers));

Nice find on the array_unique by the way :). If you need more explanation, let me know! Some explanation on the $var = $condition ? true : false line I used:

// This line..
$numbers = !empty($_POST['numbers']) ? $_POST['numbers'] : array();

// ..is shortcode for:
if (!empty($_POST['numbers'])) {
    $numbers = $_POST['numbers'];
}
else {
    $numbers = array();
}

Well first thing that comes to mind: did you check if src/autoload.php points at something that exists from the directory you're in? :p And do you have permission to read it?

So if there is more than one occurence of the same product with the same percentage, you don't want it listed?

Sorry, forgot to explain that other bit. Thanks Diafol! Nice addition.

Well, a quick search on Google seems to result in an answer to your question.

See http://stackoverflow.com/questions/3366895/group-by-month-and-year-in-mysql

You can't specify target table 'telefonisti_podaci' for update in FROM claus

This looks like a non-default MySQL error. Maybe it's a custom error triggered by your CustomQuery function? If so, then you could check that function to see when and thus why it is thrown/given.

You have to be more specific. What values do you want to hide? Have you written any code yet?

Well, I'm glad you discovered the next clue ;). Let us know if you find anything that is wrong with it and if you need help with it.

You are only passing 3 arguments to your Get_All_Orderlines_Range() function, while it needs 4.

Ok, this is confusing me somewhat: your file is in the list with included files, but if you output text inside that include file, it isn't being shown on the screen? Or does output get shown on the screen, and is it the "false" that is generated by var_dump(function_exists('Get_Favourites'));? Have you tried using different spelling for your function name and checking (with the function_exists() function) if the function does get defined properly with that spelling?

In addition to my answer, you can measure how long actions take by using - for example - the microtime function. Example:

// ----- ACTION 1: -----

$start = microtime(true);

for ($i = 0; $i < 9999; $i++) {
    // Perform action 1.
}

$end = microtime(true) - $start;
$avg_time_per_action_1 = $end / 9999;

// ----- ACTION 2: -----

$start = microtime(true);

for ($i = 0; $i < 9999; $i++) {
    // Perform action 2.
}

$end = microtime(true) - $start;
$avg_time_per_action_2 = $end / 9999;

// ----- RESULTS: -----
echo 'Avg time 1: ' . $avg_time_per_action_1 . ', 2: ' . $avg_time_per_action_2 . '<br>';

Well, usually an update query takes longer than a select query because an update query locks the database where a select query does not. Therefore, if you can avoid an update query by running a select query, it might do good to your app's performance. You will need to have use case statistics, however, to see how many times values actually remain unchanged, what the difference in impact is for both scenarios, etc., to be able to give a true answer to your question.

Well yes, it must be that, then. That's why I thought you could try to output var_dump(function_exists('Get_Favourites')); inside the file that defines the function (after the function is defined) to see if it really is a problem with the function definition. Have you tried that?

So if you add an echo to the file that defines your Get_Favourites() function, and then include that file, nothing is being echo'd to the screen? E.g. if you add echo 'Hey, you\'ve just included me!';, it doesn't show on the screen? Because if that is the case, you simply need to make sure that your file is properly included.

Then what is it displaying? :)

Well, maybe you could add some debug code to the file that contains that function that says "Hey, you've just included me!" and after that line something like var_dump(function_exists('Get_Favourites')); to see if the function has been defined (bottom lines of the function file).

Well, if it is not in the list that is returned by get_defined_functions() there is something wrong, apparently :p. Is it in the list?

You could write it in the same place that you wrote the get_included_files() function, i.e. the line before the error.

Example: print_r(get_defined_functions()); exit();

Is the file being included before the function is called? Have you checked if there isn't a case problem (not that PHP functions are case sensitive, for as far as I know, but just to be sure)? Have you used get_defined_functions() to see if your function has actually been registered as defined?

You can check whether the correct file (the one that defines the function) has been included by executing print_r(get_included_files()); exit(); the line before the error.