Jump to content

Search the Community

Showing results for tags 'classes php mysql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi there, I have search everywhere for a similar problem or example and cannot find one that helps my code to work. It is a really basic family tree webpage. I am building it as my learning platform. Following is the PHP code I am using: <?php $link = mysql_connect('localhost', 'MY_DB', 'MY_PASSWORD'); if (!$link) { die('Could not connect: ' . mysql_error()); } class treeClass { public $rowstart = "1"; public $mother = ""; public function fillpoolLrg() { $loopResult = ''; $events = mysql_query("SELECT name FROM pikiconz_data.tangata WHERE id = '$rowstart'"); while($row = mysql_fetch_array($events)) { $loopResult .= ' <div class="poolLrg pool">'.$row['name'].'</div>'; $mother = $row['mother']; } echo $loopResult; return $mother; } public function fillMedPb2() { $loopResult = ''; $events = mysql_query("SELECT name FROM pikiconz_data.tangata WHERE id = '$mother'"); if($row = mysql_fetch_array($events)) { $loopResult .= ' <div class="poolMed pool">'.$row['name'].'</div>'; } else { $loopResult .= ' <div class="poolMed pool">'.'ADD'.'</br>'.'PERSON'.'</div>'; } echo $loopResult; } } ?> So, for the life of me I just can not get this code to display the div that is in the function. It works if I remove the class.. just not WITH the class.. I have looked everywhere and can not help but think it is either something really simple OR I am using classes in a completely erroneous way. Any help, thoughts or general advice on where to head for answers would be greatly appreciated! Thank you in advance. Castor
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.