516485 Small cronjob fix


attached and below you can see the cronjob file.

It is supposed to update 2 tables ("moneypool" and "users"), the field "username" is at both.

It works fine when a user has just 1 position (line) in the table "moneypool".

When a user has several lines it still adds just 1 at the other table "users" at users.

I need that the cronjob works down each line at "moneypool", for example a user has 3 lines it would add 1 each time at [url removed, login to view] and [url removed, login to view] (So in total 3).

I hope this is understandable.




# PHP supports both // and # for comments. Another thing inherited from Perl.

# set up the database login variables

$db_name = 'xxx';

$db_user = 'xxx';

$user_pass = 'xxx';

$db_host = 'localhost';

$table = 'moneypool';

$field = 'Earning';

// Make the database connection


$link = mysql_pconnect("$db_host","$db_user","$user_pass");


mysql_query("DELETE FROM $table WHERE $field >=15.00");

// Select statement, execute


$select = "UPDATE moneypool, users SET [url removed, login to view] = [url removed, login to view] +1, [url removed, login to view] = [url removed, login to view] +1, [url removed, login to view] = [url removed, login to view] +1 WHERE [url removed, login to view] = [url removed, login to view]";



Beceriler: Her şey Kabul, MySQL, Perl, PHP

Daha fazlasını gör: inherited, php connection select, php localhost, statement position, perl update file, small works, earning line, perl fix, fix small php file, several fix, perl file select, small php works, php select table update, php cronjob, perl connection execute, cronjob php, fix tables, small database example, execute perl, execute perl perl, update attached file database php, lines perl, perl update database, perl table update database, perl login code

İşveren Hakkında:
( 9 değerlendirme ) Austria

Proje NO: #2262417



Lets get it done now....

%selectedBids___i_period_sub_7% gün içinde 20%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(128 Değerlendirme)