Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2004, 11:37 AM
mugafuga mugafuga is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 mugafuga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHPObject Help me please



I have done everything and more that the Ghostwire site has given to make phpObject work.

However it doesn't seem to work for me.

I have made a class in php for pulling records from a little mySQL db.

PHP Code:
<?php
class records
{
    function 
getrecords()    {
        
$db_name "roisport_ROICharts";
        
$connection mysql_connect("localhost""roisport""missalic") or die("Could not connect to database");
        
mysql_select_db($db_name$connection) or die("Could not select database");
        
$query "SELECT * FROM ROI_Data WHERE 1";
        
$results_query mysql_query($query);
        if (
$results_query) {
            echo(
"query completed successfully");
        } else {
            echo(
"An error has occured");
        } 
        return 
$results_query;
        
mysql_close($connection);
    }
}
// a function to debug the ho
function debugObject($ob) { 
     echo 
"<pre>\n"
     
print_r($ob); 
     echo 
"</pre>\n"

$myObject = new records(); 
debugObject($myObject);
?>


When i run the class my debug code only prints out

records Object
(
)

Is something wrong with my debug code?

I know its getting the data I have used the same connection data and sql query on another page and it pulls the data no problem.

I need to make sure my class is doing what it was meant to do before I can even mess with the flash part, this I know but I am totally stumped.

Anyone???

Reply With Quote
  #2  
Old February 19th, 2004, 06:11 PM
Tann San Tann San is online now
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,714 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 10093 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 1 m 3 sec
Reputation Power: 580
Facebook MySpace
Hi, your output is correct. You not actually doing anything with your class. Try this:

PHP Code:
 $myObject = new records(); 
debugObject($myObject->getrecords()); 


It's good to see another phpObject user :¬) There's two forums for ghostwire studios. People still use both so it's worth posting to each of them.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > PHPObject Help me please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT