Jump to content

i-fm

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

i-fm's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Vikas Thank you so much.... that was simple in the end... just went into the server and changed the permissions and all working.
  2. this seems to of stumped a few people, myself included.
  3. This is the entire page code if it helps. ---- <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="title"><?php //display ttitle print(stripslashes($pagedata['name'])); ?></td> </tr> </table><br><?php $result = mysql_query("SELECT COUNT(*) AS total_entries FROM articles WHERE type = 'Feature'") or die(mysql_error()); $row = mysql_fetch_row($result); $total_entries = $row[0]; $entries_per_page = 10; if(isset($_GET['page_number'])) { $page_number = $_GET['page_number']; } else { $page_number = 1; } $total_pages = ceil($total_entries / $entries_per_page); $offset = ($page_number - 1) * $entries_per_page; //create table query object $data = $db->select_list_b("SELECT articles.*, partners.image FROM articles LEFT JOIN partners ON articles.source = partners.name WHERE type = 'Feature' AND pdate < CURDATE() LIMIT $offset, $entries_per_page"); while ($data = $db->fetch_array()){ ?><table width="500" border="0" cellspacing="2" cellpadding="2"> <tr> <td bgcolor="#eeeedd" width="100"><img src="images/partners/<?php print($data['image']); ?>"></td> <td valign="top" bgcolor="#eeeedd"><span class="para"><a href="index.php?p=articlef&story=<?php print($data['art_id']); ?>"><?php print($data['headline']); ?></a></span><br> <span class="parasmall"><?php print($data['synopsis']); ?></span><br> <i><span class="parasmall">Published - <?php print date("D jS F Y",strtotime($data['pdate'])); ?></span><br> </i><br> </td> </tr> </table><span class="para"><a href="index.php?p=partners#<?php print($data['name']); ?>"><?php print($data['name']); ?></a><?php } ?><br> <br>Page <?php for($i = 1; $i <= $total_pages; $i++) { if($i == $page_number) { print "$i "; } else { print " <a href='index.php?p=features&page_number=$i'>$i</a> "; } } ?></span>
  4. yes pdate is in articles... ORDER BY did work before i added articles.*, partners.image FROM articles LEFT JOIN partners ON articles.source = partners.name When it used to be just SELECT * FROM articles WHERE type = 'Feature' AND pdate < CURDATE() ORDER BY pdate DESC LIMIT $offset, $entries_per_page
  5. I'm using the following bit of code SELECT articles.*, partners.image FROM articles LEFT JOIN partners ON articles.source = partners.name WHERE type = 'Feature' AND pdate < CURDATE() ORDER BY pdate DESC LIMIT $offset, $entries_per_page And i get this error, which i have never seen before Can't create/write to file '/var/tmp/#sql_16abc_0.MYI' (Errcode: 13) SELECT articles.*, partners.image FROM articles LEFT JOIN partners ON articles.source = partners.name WHERE type = 'Feature' AND pdate < CURDATE() ORDER BY pdate DESC LIMIT 0, 10 But if i remove ORDER BY pdate It Works, but i don't want to remove because i need it. Can anyone help? cheers Dave
  6. Liam Thank you, works perfect.... couldnt ask for a simplier or quicker fix. Cheers Dave
  7. I've spent a fair bit of time looking around other posts looking for answer to this one and couldnt really come up with anything. I have an events list. shows it by date - (this field is called sdate saved in mysql using date) at the moment it shows everything in the database, but what i want it to do is not show any old dates (records)... i only want it to show upcoming dates and not past dates. thanks in advance dave
  8. Thanks guys, Geoip looks very handy, am trialling that. Dave
  9. Hi all, 1st post, hope you can help. I run an english site - www.i-fm.net (which has as lock content to licensed users) and we intend to now also do a version for U.A.E.... As it's an old system originally, i will be feeding the content through to the new site. which isn't a problem.... Anyway to get to the point. Is it possible to block viewers from the uk accessing certain pages/content for the new site, or another would be to block everyone from certain pages/content unless they are in UAE. Thanks in Advance Dave
×
×
  • 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.