Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7169741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:04:17+00:00 2026-05-28T15:04:17+00:00

You will have to get.class.php for giving help. Working case(index.php spaghetti): <?php require_once ‘classes/get.class.php’;

  • 0

You will have to get.class.php for giving help.

Working case(index.php spaghetti):

<?php
require_once 'classes/get.class.php';
$get = new Get();
$get->getSql("SELECT * FROM gunler ORDER BY g_id ASC LIMIT 0,15");
foreach($get->getData() as $data)
{
    echo $data["g_name"];
}
?>

result of spaghetti:

18 January 2012

the successful in a sense.

Are not working case:

<?php
require_once 'get.class.php';

Class Main Extends Get
{
    function __construct()
    {
        // boş
    }

    public function getGun($limit = 15, $sayfa = 1)
    {
        $limit1 = $limit * ($sayfa - 1);
        $limit2 = $limit1 + $limit;
        parent::getSql("SELECT * FROM gunler ORDER BY g_id ASC LIMIT " . $limit1 . "," . $limit2);
        return parent::getData();
    }
}

?>
$main = new Main();

print_r($main->getGun());

result of this:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\dailypremium\classes\get.class.php on line 39

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\dailypremium\classes\get.class.php on line 55
Array ( )

I can’t see any difference first codes between second codes. Where is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:04:18+00:00Added an answer on May 28, 2026 at 3:04 pm

    This is likely happening because you are not calling parent::__construct() in your overridden constructor and your database connection is never created.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have managed to get a UPS Shipping calculator working in PHP. I now
In PHP I know many people will use a class to SET and GET
Occasionally I will have some badly formed PHP code and I will get a
I have some code that at one part will get executed a lot, and
I have a website where an ajax call will get some Json data from
I have created a Webpage which will post as post method..not as get method.
I have some code in method C that will get executed based upon the
Here is the query which will get me all the contacts have HD quality
I have client/server application where the client app will open files. Those files get
I have the method below, which in my Blackjack app will get the value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.