Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Turismo

Members
  • Joined

  • Last visited

  1. Worked perfect! Thank you very much
  2. Hi all, I'm stuck with setting an ORDER command in an SQL query, could someone please help. I'm trying to order by descending date. Here's what I'm trying: $sql = "SELECT * FROM `videos` ORDER BY `date` DESC WHERE " . ((!@empty($_REQUEST["id"])) ? "`entry` = '" . $_REQUEST["id"] . "'" : "`link` = '" . @$_SERVER["QUERY_STRING"] . "'"); The above creates the following error on the page: Query failed : SELECT * FROM `videos` ORDER BY `date` DESC WHERE `entry` = '44' at line 93 Without putting in an ORDER command, the result displays no problem. However, the oldest entries are at the top. I'm trying to get my results to order with the newest at the top. Could someone please suggest where I am going wrong. Thank you
  3. Hi, I've got it working! Thank you very much for your help
  4. Thanks. Again, I'm not sure if I'm doing this right and its quite hard to explain what I'm trying to do. Please don't worry if it's too much trouble, the code I've got set up for the page is: <?php include("../includes/db_open.php"); $sql = "SELECT *, DATE_FORMAT(`date`, '%D %M %Y') AS `date` FROM `videos_category` WHERE " . ((!@empty($_REQUEST["id"])) ? "`id` = '" . $_REQUEST["id"] . "'" : "`link` = '" . @$_SERVER["QUERY_STRING"] . "'"); $result10 = mysql_query($sql) or die("Query failed : {$sql} at line " . __line__); if (mysql_num_rows($result10) == 0) { header("location: " . $_SERVER["HTTP_REFERER"]); exit; } $row = mysql_fetch_assoc($result10); ?> <?php set_include_path(get_include_path() . ":../includes:../../includes"); include("root.php"); ?> <html> <head> </head> <body> <?php $id = intval($_REQUEST["id"]); $sql = sprintf("SELECT * FROM videos WHERE id = '%s' " , mysql_real_escape_string($id) ); $result4 = mysql_query($sql) or die("Query failed : {$sql} at line " . __line__); $n = 0; while ($row = mysql_fetch_assoc($result4)) { $n++; if (strlen($row["heading"]) > 30) $row["heading"] = substr($row["heading"], 0, 30) . "..."; ?> <div class="youtube_full"> <div class="youtube_video"> <img src="images/round_image_border_1.png" width="18" height="19" alt="Border" class="border_1" /> <img src="images/round_image_border_2.png" width="18" height="19" alt="Border" class="border_2" /> <img src="images/round_image_border_3.png" width="18" height="19" alt="Border" class="border_3" /> <img src="images/round_image_border_4.png" width="18" height="19" alt="Border" class="border_4" /> <?php echo str_replace(array("265", "320"), array("220", "285"), $row["description"])?> </div> <p><?php echo $row["heading"]?></p> </div> <?php if ($n < mysql_num_rows($result4)) { ?> <?php } } ?> <?php echo '<pre>'; print_r($row); echo '</pre>' ?> </body> </html>
  5. Hey, thanks for the help I am, however, still running into a bit of difficulty. I've tried implementing your code above but my videos are still not showing. Is how I've done it below how it should be? <?php $id = intval($_REQUEST["id"]); $sql = sprintf("SELECT * FROM videos WHERE id = '%s' " , mysql_real_escape_string($id) ); $result4 = mysql_query($sql) or die("Query failed : {$sql} at line " . __line__); $n = 0; while ($row = mysql_fetch_assoc($result4)) { $n++; if (strlen($row["heading"]) > 30) $row["heading"] = substr($row["heading"], 0, 30) . "..."; ?> <div class="youtube_full"> <div class="youtube_video"> <img src="images/round_image_border_1.png" width="18" height="19" alt="Border" class="border_1" /> <img src="images/round_image_border_2.png" width="18" height="19" alt="Border" class="border_2" /> <img src="images/round_image_border_3.png" width="18" height="19" alt="Border" class="border_3" /> <img src="images/round_image_border_4.png" width="18" height="19" alt="Border" class="border_4" /> <?php echo str_replace(array("265", "320"), array("220", "285"), $row["description"])?> </div> <p><?php echo $row["heading"]?></p> </div> <?php if ($n < mysql_num_rows($result4)) { ?> <?php } } ?>
  6. Hi all, I'm trying to request an id within an SQL query but just can't figure out the correct syntax. Could someone please suggest where I am going wrong. Here is what I currently have: $sql = "SELECT * FROM `videos` ORDER BY `order` WHERE " . ("`id` = " . $_REQUEST["id"] . ""); Could some please help me identify where I'm going wrong.
  7. Thank you very much
  8. Hi there, Could someone please help me with this PHP command please... <?php echo str_replace("265", "160", $row["video"])?> This is for a client who is inserting the YouTube embed code into a field that gets updated on the site. The values above basically are saying that to replace 265 with 160 (if that value is found in the code - this refers to the height of the video object). However, I ALSO want it to replace the width value from 320 to 198, but I don't know how to add more than one string replace into the above code. I'm good at using PHP but not creating it in some cases! Could someone please help me with this one. Many thanks.
  9. Ah I see, I'll give it a go and see what I can do with it. Thanks a lot
  10. Nice! Thanks a lot. But what do you mean by a text indent?
  11. Hi everyone! I have created a navigation bar using CSS and I have applied background images to the links within the navigation. I know how to create :hover states for these CSS links, however does anyone know of a smooth transition effect I can use? I presume this will involve a combination of CSS and jQuery or JavaScript? It's important for SEO that I retain the text within the link and that they are not just graphic buttons. Anyone know some good code/suggestions for this please?
  12. Could you elaborate on what you mean by "long tailed keywords" please.
  13. Hi all, I have a client who is top of Google for his organic listings, yey! However his main local competitor is in 2nd position and to try and in a cheap effort to get above him has completely abused the Google Local Business Map listings in my opinion. He has basically got three different areas in the town that he has weekly clubs at. Two of which are a combined property. He has registered a local business listing to each of these three areas including individual listings for the building that is basically what was two combined flats. He has spammed the listings with keywords. The three listings that show up while subtly different in location - are all the same business and web site. Is this kind of thing allowed? And if not, is there any way I can report it or at least put my case forward?

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.