ich habe folgendes Problemchen:
Ich habe eine Klasse IPN dann noch eine normale PHP Datei IPN.php
name: IPN_class.php
PHP Code:
class IPN
{
... // Hier habe ich ein paar Variablen deklariert
$Bookings_Row = 0;
$Bookings_SQL = 0;
$SQL_NumRows = 0;
....
}
PHP Code:
function DoSQL($con)
{
if($con == 'CheckBookings')
{
$Bookings_SQL = sprintf("
SELECT *
.... Hier meine SQL Abfrage
",mysql_real_escape_string($this->xDB_UID),mysql_real_escape_string($this->P_payment_amount),mysql_real_escape_string($this->P_custom));
$Bookings_Result = mysql_query($Bookings_SQL)or die(mysql_error());;
$IPN->SQL_NumRows = mysql_num_rows($Bookings_Result);
$rows = mysql_fetch_object($Bookings_Result);
}
elseif($con == 'UpdateBookings')
{
$Update_Bookings = sprintf("
UPDATE `bookings`
SET
`completed` = '1', `completed_time` = now(), `transactions_id` = '%s'
WHERE booking_id = '%s'", $IPN->P_txn_id, [B]$this->Bookings_Row->bookings_id[/B], andere Werte,,,);
$Bookings_query = mysql_query($Update_Bookings)or die(mysql_error());;
}
}
Mit 2 x -> also
$this->Bookings_Row->bookings_id funktioniert es nicht ganz. Wie kann ich das anders lösen ? Ich brauche in der CheckBookings SQL einfach die 2 Werte bookings_id & user_id die ich dann in der unteren abfrage benutzen muss.
Ich bitte um eure hilfe vielen dank
Vielleicht sollte ich noch einfügen, dass ich so eine Abfrage habe:
PHP Code:
public function SQL_Success($ss)
{
if($ss == 'Bookings')
{
if($this->SQL_NumRows) return '1';
}
}
PHP Code:
$IPN->DoSQL('CheckBookings');
if($IPN->SQL_Success('Bookings'))
{
...
}
Vielen Dank
Edit: Ich habe die Lösung ich muss $this->row['bookings_id']; für diejenigen, die ähnliche Probleme haben






