Jump to content

Recommended Posts

I always get an error with this code...

<?php 
$query="SELECT * FROM  videos
INNER JOIN alist ON videos.title=alist.title WHERE alist.title='$_GET[title]'";

$row = mysql_fetch_array($query))
	{ $title = str_replace( " ", "-", $row[title]);
$eno = str_replace( " ", "-", $row[eno]);
$title = str_replace( ".", "", $row[title]);
$eno = str_replace( ".", "", $row[eno]);

	echo "if ($row['thumb'] == "")  { while($r = mysql_fetch_array($result))
	{ echo "$r[lthumb]"; if ($r[lthumb] == "") { echo "http://www.janime.tv/banner.gif"; } else { echo "{$row[thumb]}"; }}";

	}

?>

 

what im trying to do is if the thumb from videos is empty, i will get the specified thumb from alist, and if there is no thumb in alist i will set the default 'no_image' link

Link to comment
https://forums.phpfreaks.com/topic/203493-mysql_fetch_array/
Share on other sites

not quite sure what you are trying to achieve here your code is really confusing to look at sorry but i hope this gives you some ideas.

 

if(isset($_GET['title'])){
$title = $_GET['title'];

$query="SELECT * FROM videos INNER JOIN alist ON videos.title=alist.title WHERE alist.title='$title'";
$rquery=mysql_query($query);
while($row=mysql_fetch_assoc($rquery)){

$title=$row['title'];
$thumb=$row['thumb'];

if ($thumb==false){
echo '<img src=\"link.php/imagefolder/nolink.gif\">';
} //-----END if ($thumb==false)

if ($thumb==true){
echo '<img src=\"link.php/imagefolder/'.$thumb.'\">';
} //-----END if ($thumb==true)

} //-----END while($row=mysql_fetch_assoc($rquery))

}//-----END if(isset($_GET['title']))

Link to comment
https://forums.phpfreaks.com/topic/203493-mysql_fetch_array/#findComment-1066041
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.