influenceuk
Members-
Posts
20 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
influenceuk's Achievements
Newbie (1/5)
0
Reputation
-
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?
-
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
arrr, ok. i will look into this see how i get on. Cheers guys for your help, its much appreciated -
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
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 -
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
huh? not sure what u mean -
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
-
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
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>"; ?> -
which pages? or is it on all? I have only tested with IE7 and firefox
-
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.
-
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
-
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
done that, now i not getting any error msgs. however its still displaying the date wrong?! -
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
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 -
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
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 ??? -
[SOLVED] Having problems with MySQL and PHP displaying the date
influenceuk replied to influenceuk's topic in MySQL Help
sorry can you give me an example of where to enter this as i have tried it and it did not work? -
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>"; ?>
-
Format SQL to display data in a group?
influenceuk replied to influenceuk's topic in PHP Coding Help
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?