Jump to content

influenceuk

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Everything posted by influenceuk

  1. Hi guys, Really having some issues getting a search feature implemented onto my site. Basically i am after a search which will search the database (2 tables) and display the results the user has searched for. I have tried the codes from the library from PHP Freaks, yet had no luck. Can any one help me please?
  2. arrr, ok. i will look into this see how i get on. Cheers guys for your help, its much appreciated
  3. awesome it worked!!! cheers guys! Final question i have is do u know how i can group the releases by month? for exaple June: item 1 19 june 2007 July Item 2 1 July 2007 Item 3 2 July 2007
  4. Cheers. I will look at adding a bit more colour to it, i think it needs a bit more content on he front page. The logo is quite important and its in th same style as the Blu-ray logo so i might keep it, see what happens thanks for the reply
  5. I am now using this code, which includes my original code, along with the code that was provided by yourself. As before i am after getting the Date display like - 13 June 2007 rather than the MySQL one - 2007-06-13 Cheers for all your help <?php include 'connect.php'; if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } $max_results = 15; $from = (($page * $max_results) - $max_results); $sql = mysql_query("SELECT *,DATE_FORMAT(rdate,'%e %M %Y') AS rdate_formatted FROM table2 WHERE rdate > CURRENT_DATE ORDER BY rdate LIMIT $from, $max_results"); $bgcolor = "#E0E0E0"; echo("<table>"); echo"<tr class=titlebg><td><b>Title</b><td><b>Studio</b><td><b>Release Date</b></tr>"; while($row = mysql_fetch_array($sql)){ if ($bgcolor == "#E0E0E0"){ $bgcolor = "#FFFFFF"; }else{ $bgcolor = "#E0E0E0"; } echo("<tr bgcolor=".$bgcolor."><td width=350 nowrap>"); echo($row["title"]); echo("</td><td width=175 nowrap>"); echo($row["studio"]); echo("</td><td align=\"center\">"); echo($row["rdate"]); echo("</td></tr>"); } echo("</table>"); $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM table2 WHERE `rdate` > CURRENT_DATE ORDER BY 'rdate'"),0); $total_pages = ceil($total_results / $max_results); echo "<center>Select a Page<br />"; if($page > 1){ $prev = ($page - 1); echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\">Prev</a> -"; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo " <a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> "; } } if($page < $total_pages){ $next = ($page + 1); echo "- <a href=\"".$_SERVER['PHP_SELF']."?page=$next\">Next</a>"; } echo "</center>"; ?>
  6. which pages? or is it on all? I have only tested with IE7 and firefox
  7. Here are some ideas i have already... Search Facility to find specific titles Date needs to be fix, so its more understandable (need help on this one!) Membership part, where members can go straight to the forum, and create wishlists and owned lists Links to titles, 1) so users can click to buy, 2) so users can get more info on a title (need help on this too!) Review section Infact i'm still trying to work out how to do most of these lol oh well its all a nice learning curve.
  8. Hi all, Well i have created my first PHP/MySQL based site, and its been up for just over a month now. Really just after feedback on it, and maybe suggestions on what i can do next with it. I have a few ideas, but it would be nice to know other peoples input. Any how the site is http://www.allaboutbluray.co.uk Please be nice Regards, Alan
  9. done that, now i not getting any error msgs. however its still displaying the date wrong?!
  10. i am getting this as the error... Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'release,'%e %M %Y') AS release_formatted FROM table2 WHERE releas Query: SELECT *,DATE_FORMAT(release,'%e %M %Y') AS release_formatted FROM table2 WHERE release > CURRENT_DATE ORDER BY release LIMIT 0, 15
  11. Cheers i have done this, but when i do it i get the error... Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .... line 44 Line 44 is while($row = mysql_fetch_array($sql)){ i cant work out what to do ???
  12. sorry can you give me an example of where to enter this as i have tried it and it did not work?
  13. Hi, i am having issues with displaying the date correctly, can someone check out my code and advise where i am going wrong please? Basically the script works fine and will display the following... Title Studio Release A Item A Studio 2007-06-12 I am after getting the date to format like this - 12 June 2007. I have tried putting in the Date Format bit but it wont work or i get errors Please help :?: <?php include 'connect.php'; if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } $max_results = 15; $from = (($page * $max_results) - $max_results); $sql = mysql_query("SELECT * FROM table2 WHERE `release` > CURRENT_DATE ORDER BY 'release' LIMIT $from, $max_results"); $bgcolor = "#E0E0E0"; echo("<table>"); echo"<tr class=titlebg><td><b>Title</b><td><b>Studio</b><td><b>Release Date</b></tr>"; while($row = mysql_fetch_array($sql)){ if ($bgcolor == "#E0E0E0"){ $bgcolor = "#FFFFFF"; }else{ $bgcolor = "#E0E0E0"; } echo("<tr bgcolor=".$bgcolor."><td width=350 nowrap>"); echo($row["title"]); echo("</td><td width=175 nowrap>"); echo($row["studio"]); echo("</td><td align=\"center\">"); echo($row["release"]); echo("</td></tr>"); } echo("</table>"); $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM table2 WHERE `release` > CURRENT_DATE ORDER BY 'release'"),0); $total_pages = ceil($total_results / $max_results); echo "<center>Select a Page<br />"; if($page > 1){ $prev = ($page - 1); echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\">Prev</a> -"; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo " <a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> "; } } if($page < $total_pages){ $next = ($page + 1); echo "- <a href=\"".$_SERVER['PHP_SELF']."?page=$next\">Next</a>"; } echo "</center>"; ?>
  14. Barand, I tried it however i could not get it to work Basically i have this table set up... Title Studio Release Now i wanna get try get them displayed in months as stated above. I saw what you had given the other guy worked for him, i could just not work out how to mod the code for my use?
  15. Cheers guys! I feel like a bit of a tit now lol that post you guided me to is almost the same as what i posted!!
  16. Can any one tell me if there is a way to display data from a MySQL DB in groups? For example: May: Item 1 1/05/2007 Item 2 2/05/2007 Item 3 3/05/2007 June: Item 4 1/06/2007 Item 5 2/06/2007 Item 6 3/06/2007 And so on... Obviously i would be after having a title of that current month etc. But would need the data to go and update on its own, so once may has gone, June would be he first month, if you see what i mean? Any help would be great cheers
×
×
  • 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.