Devam Ediyor

516485 Small cronjob fix

Hello,

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.

Thanks.

Code:

<?php

# 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_select_db("$db_name",$link);

mysql_query("DELETE FROM $table WHERE $field >=[url removed, login to view]");

// 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]";

mysql_query($select);

?>

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

Daha fazlasını görün: 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, lines perl, perl update database, perl table update database, perl login code, perl lines, perl execute

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

Proje NO: #2262417

Seçilen:

csajit

Lets get it done now....

0 gün içinde 20$ USD
(128 Değerlendirme)
5.5