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).