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

  • Home
  • SEARCH
  • 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 6468581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:54:11+00:00 2026-05-25T05:54:11+00:00

Hy! I configured the modules/database/database.php file. In controller/index.php I have: $query = DB::query(Database::SELECT, ‘SELECT

  • 0

Hy!

I configured the modules/database/database.php file. In controller/index.php I have:

$query = DB::query(Database::SELECT, 'SELECT * FROM posts ORDER By id DESC');

Using phpmyadmin, I created two blog posts, but the script doesn’t seem to get them from the database. I don’t see any errors and also the blog posts are not visible.

P.S. Sorry for my bad English, I am a schoolboy from Latvia and I’m learning English. 🙂

  • 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-25T05:54:12+00:00Added an answer on May 25, 2026 at 5:54 am

    please read documentation: “Once you are done building, you can execute the query using execute() and use the results.”

    $query = DB::query(Database::SELECT, 'SELECT * FROM posts ORDER By id DESC')->execute();
    

    Now you can use foreach.

    foreach($query as $item){  ..  }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have PHP configured so that magic quotes are on and register globals are
I have configured PHP to run under FastCgi on IIS7 on Windows Server 2008
I've to work with a ingres database for my php server. I just have
I have a NAT configured to run when loading up my favorite Linux distribution
I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the
I have IIS6 configured such that browsing to http://localhost:8082/Reports gets me the reporting services
I've got it configured, but I want more from it...maybe Cygwin isn't the right
I've deployed a web-module which connects to the database via a datasource configured in
I need to make sure that PHP sites that I administrate, don't have any
I just configured Eclipse with PyDev latest version, but when I import external modules,

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.