Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 10:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP *Class*$row*mysql_fetch_objects

Discussion on PHP *Class*$row*mysql_fetch_objects within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
C0RE''s Avatar
 
elite*gold: 40
Join Date: Mar 2013
Posts: 1,396
Received Thanks: 778
PHP *Class*$row*mysql_fetch_objects

Hallo epvp

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;
....


Dann habe ich eine Function :
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());;
        }
    } 
Wie kann ich dieses Lösen

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';
        }
    } 
Einfach ne kleine Funktion die man dann mit :
PHP Code:
$IPN->DoSQL('CheckBookings');
if(
$IPN->SQL_Success('Bookings'))
{
...

aufruft.

Vielen Dank

Edit: Ich habe die Lösung ich muss $this->row['bookings_id']; für diejenigen, die ähnliche Probleme haben
C0RE' is offline  
Reply


Similar Threads Similar Threads
what is the best class to grind metin2 yang(class selection guide for newbies)
07/07/2012 - Metin2 - 1 Replies
Again, I am using Enligsh. So if you cant read it well, just turn to google online translation. If i am supposed to say or answer what is the best class for grinding metin2 yang in Metin2, of course the most efficiently, i strongly recommand the Warrior, and promote to Sword Warrior at level 5. This class has both high defense and attack, as well as great area attack skill and control skill(I mean the stun skill). I recommend the BM sura as your second choice,because he has the sweetest...



All times are GMT +1. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.