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 8019389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:22:37+00:00 2026-06-04T21:22:37+00:00

I am unable to add the LIMIT variable to the following code. I am

  • 0

I am unable to add the LIMIT variable to the following code. I am trying to just display the first record, but when I add “LIMIT 1″ after the .$gid part of the code, I get an error. I have tried every variable. I am also not sure why the ” space period $gid is formatted like it is.

<?php

$sql = "SELECT * FROM `loan_real_types` WHERE fKeyGroup = " . $gid;
$result = mysql_query($sql) or die(mysql_error());
while($results = mysql_fetch_assoc($result)) {
    echo "" . $results['name'] . "";
}

?>

Ultimately, I am just trying to display the first record of the table where fkeyGroup is a match.

  • 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-06-04T21:22:38+00:00Added an answer on June 4, 2026 at 9:22 pm

    You probably just forgot to add space before LIMIT which would cause an error.

    $sql = "SELECT * FROM `loan_real_types` WHERE fKeyGroup = " . $gid . " LIMIT 1";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code working fine, but I'm unable to add a zoom
I have the code following where I am unable to add Autoplay on the
i created a text-box through the code behind but was unable to add a
I am using the following code but still its not able to add contact
I wanted to design a UI like this, But i am unable to add
I've searched many places and seen many examples, but I'm still unable to add
I am using System.Xml.Linq But is unable to add an reference to it, the
In my dev console, I get the following error: android.view.WindowManager$BadTokenException: Unable to add window
I want to add credits to my fb app but I am unable to
I'm unable to add an mdf database file by right clicking on the project

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.