Advertisement
Advertisement
| 03.04.2008 at 08:06AM PST, ID: 23213018 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: |
<?php
// Tell where the page is and the number and site
$pagenum='1';
$site='http://127.0.0.1/'; //My Local Test host
// Connecting, selecting database
$link = mysql_connect('localhost', 'myusername', 'mypassword')
or die('Could not connect: ' . mysql_error());
//echo 'Connected successfully';
mysql_select_db('mydatabase') or die('Could not select database');
// Performing SQL query
$query = "SELECT * FROM image_admin WHERE (pagenumber='$pagenum' AND website='$site' AND active='1') ORDER BY RAND() LIMIT 0,54";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
//ALL THE ABOVE WORKS FINE!
?>
<!-- INSERT HEADING 1 -->
<?php
//THE CODE BELOW DOES BOT WORK - RETURNS BLANK PAGE NO ERRORS
&query2 = "SELECT * FROM tbl_banners WHERE page_no='$pagenum' AND site='$site'";
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
$row=mysql_fetch_assoc($result2);
echo '<div class="title_text"><font color="#FFFFFF">'.$row['heading'].'</font></div>';
?>
<!-- IMAGE ROW 1 -->
<!-- START PICTURE TABLE 1 -->
<!-- THE CODE BELOW WORKS FINE TOO !!! -->
<?php
// Printing results in HTML
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$i++;
print '<a href="'.$line['affiliate_link'].'" target="_blank"><img class="imgpic" src="'.$line['website'].$line['path'].$line['image_thumbnail'].'" alt="" title="" width="'.$line['img_width'].'" height="'.$line['img_height'].'"></a> ';
if ($i==6) {
print '<div> </div>';
$i=0;
}
}
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
|