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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:44:11+00:00 2026-06-09T22:44:11+00:00

I have a strange problem this time. I’ve got a masking database setup that

  • 0

I have a strange problem this time. I’ve got a masking database setup that takes in a url and gives it a string mask so that I can redirect users to another site (direct download) by giving them a link to my site’s redirection engine.

I’m having a problem in the administrator side (where I put in the urls) where my mysql_fetch_array command just doesn’t run. I know the query is returning at least one row because when I run the following code:

$query = "SELECT * FROM `urls` WHERE `in`='$lks[$i]' ORDER BY `id` DESC LIMIT 1";

$r = mysql_query($query);

if(mysql_num_rows($r) < 1)
echo "Less than 1";
else
echo "At least 1";

it returns “At least 1”, but when it gets down to the mysql_fetch_array while statement, nothing happens. It’s like it just ignores it completely.

CODE:

$query = "SELECT * FROM `urls` WHERE `in`='$lks[$i]' ORDER BY `id` DESC LIMIT 1";

$r = mysql_query($query);

while($me = mysql_fetch_array($r))
{
    echo "Blah";
}

Nothing is echoed by this code. What’s wrong?

By the way, I know that I am connected to the database and everything because I run other commands very similar to this before this one and they all execute without any problems.

Also this command is in a for loop (I don’t know why this would be a problem because I have done this many times before and never had any problems).

  • 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-09T22:44:12+00:00Added an answer on June 9, 2026 at 10:44 pm

    try echoing mysql_error(); I’m thinking it might be that you put your column and table names in quotes.

    $query = "SELECT * FROM urls WHERE in='$lks[$i]' ORDER BY id DESC LIMIT 1";
    $r = mysql_query($query);
    if($r)
    {
    $rowCount = mysql_num_rows($r);
    if($rowCount == 1)
    {
    echo "1 row";
    }
    }
    else
    {
    echo mysql_error(); 
    }
    

    if this doesn’t work there must be something wrong with your array. :/

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

Sidebar

Related Questions

i have a strange problem with jquery i have this div that shows messages
I have this strange problem. I am retrieving twitters and it works on the
i have this strange problem with the PHP function CTYPE_ALNUM if i do: PHP:
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:
I have a strange problem. I do this query in a node.js server using
I have a strange problem. I have this method, which should generate a Date
I am facing a strange problem and have no idea how to fix this
I have a problem with a strange crash on iPad 5.0. This crash only
I've got a strange problem here. I have a winforms panel which programatically has
This is a strange problem that I am having with WCF trying to send

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.