Jump to content


Member Since 13 Jul 2004
Offline Last Active Jan 13 2014 06:52 PM

Topics I've Started

Phpmyadmin and other PHP tools do not agree

13 January 2014 - 02:46 AM

I have a table where users insert table via a form (this is done through a Joomla module).  When I view that table in phpmyadmin, it only returns 73 rows.  Yet when I view the data via the module itself (there is an output portion), there are 140 rows... which is what I am expecting.  I even looked at the mysql schema tables and it only sees the 73 rows.  Yet I even installed another module that pulls data based on SQL queries and THAT module also sees the 140 rows.


Does anyone know why phpmyadmin or my own PHP script on another page would not see all of the records?  I already tried repairing, flushing, and optimizing the table... all to no avail.  I'm running out of ideas.



Reading SOAP response

15 July 2011 - 02:06 AM

I'm getting the SOAP response just fine, I just don't know how to pick pieces out of it:
echo '<pre>';
     echo '</pre>';
results in:

stdClass Object
    [GetLastClosingPriceResult] => stdClass Object
            [Outcome] => Success
            [Identity] => Header
            [Delay] => 0.008
            [Security] => stdClass Object
                    [Outcome] => Success
                    [Delay] => 0
                    [CIK] => 0001341439
                    [Cusip] => 68389X105
                    [Symbol] => ORCL
                    [ISIN] => US68389X1054
                    [Valoren] => 959184
                    [Name] => Oracle Corporation
                    [Market] => NASDAQGS
                    [CategoryOrIndustry] => TECHNOLOGY

            [Date] => 7/14/2011
            [Last] => 32.05
            [Open] => 32.81
            [LastClose] => 32.69
            [High] => 33.1
            [Low] => 31.86
            [ChangeFromOpen] => -0.76
            [PercentChangeFromOpen] => -2.316
            [ChangeFromLastClose] => -0.64
            [PercentChangeFromLastClose] => -1.958
            [Volume] => 32194500
            [SplitRatio] => 1
            [LastAdjusted] => 32.05
            [OpenAdjusted] => 32.81
            [LastCloseAdjusted] => 32.69
            [HighAdjusted] => 33.1
            [LowAdjusted] => 31.86
            [ChangeFromOpenAdjusted] => -0.76
            [ChangeFromLastCloseAdjusted] => -0.64
            [VolumeAdjusted] => 32194500
            [NotTraded] => 


How do I get the symbol, for example??

access an object in $_SESSION

21 June 2011 - 07:05 PM

I'm just trying to determine if the user is logged into a Joomla site and inside the Session, they have objects that hold the information.  But how do I access those objects?


?  Nothing I try seems to work.

Here is the structure of the dump from $_SESSION:
    [__default] => Array
            [session.counter] => 3
            [session.timer.start] => 1308682834
            [session.timer.last] => 1308682837
            [session.timer.now] => 1308682837
            [session.client.browser] => Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
            [registry] => JRegistry Object
                    [_defaultNameSpace] => session
                    [_registry] => Array
                            [session] => Array
                                    [data] => stdClass Object



                    [_errors] => Array


            [user] => JUser Object
                    [id] => 0
                    [name] => 
                    [username] => 
                    [email] => 
                    [password] => 
                    [password_clear] => 
                    [usertype] => 
                    [block] => 
                    [sendEmail] => 0
                    [gid] => 0
                    [registerDate] => 
                    [lastvisitDate] => 
                    [activation] => 
                    [params] => 
                    [aid] => 0

There is more to it but I need to access the stuff in the 'user' object.

Pass database function

08 June 2011 - 07:24 PM

I'm using the PHPActiveRecord ORM and trying to create a basic query and I would have this same problem if I was writing direct SQL.  How do I pass a database function to a query and have it be parsed correctly?

$trail = new AuditTrail();
$trail->aid = "TABLESEQ.nextval";
$trail->uname = $usr;
$trail->adatetime = date("n/j/Y h:i:s A");
$trail->acat = $cat;
$trail->aaction = $action;
$trail->contract_id = $contract;
The 'TABLESEQ.nextval' is an Oracle database 'autonumber' type functionality.  I tried doing it with single quotes, double quotes, no quotes.  How do I get it to recognize it as a DB function?

The SQL query would look like: "INSERT INTO TABLE (aid, uname, adatetime, acat, aaction, contract_id) VALUES (TABLESEQ.nextval, '$usr', '".date(n/j/Y h:i:s A)."', '$cat', '$action', '$contract')"

Any ideas what I'm doing wrong?

PDO_OCI (PDO for Oracle) - please read even if you don't know oracle

07 June 2011 - 07:06 PM

I am trying to get Apache 2.2 and PHP 5.3.6 up and going and connected to an Oracle database.

I have Apache and PHP playing nicely at this point.  My problem is the PDO driver for Oracle.  I've uncommented the php_pdo_oci extension in php.ini and it seems to be adding it in after an Apache restart but the driver isn't there.

The weird part is that this is in the configure command in phpinfo:

"--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "

Those paths don't even exist.  I don't even have a D drive.  I think maybe if I could change those it would work.

OH, and I'm trying to use PHPActiveRecord, which only has a PDO extension for Oracle... which is why I'm trying to get PDO working.

But when I go to a page that actually calls for a connection using PDO, it just says that it can't find the driver.

Can anyone help me??  I've been stuck on this for 2 days!