how to make database item unique


Posted on 16th Feb 2014 07:03 pm by admin

Hey guys,

is it possible to do this:

I have the database item $title being pulled for the title and the actual clickable part of a link.

Is it possible to make the $title in the link title unique?

I ask because i'm truncating the clickable text with this code:

Code: $maxChars = 28;
if(strlen($row['album']) > $maxChars) {
$row['album'] = substr($row['album'], 0, $maxChars - 3);
$row['album'] .= "...";
}
and the link title shows the truncated version to. If i could make the clickable link or the title $title unique then i could have the full db item for the title and still have it truncated for the clickable text.

Anyone know if this is possible?

No comments posted yet

Your Answer:

Login to answer
283 Like 26 Dislike
Previous forums Next forums
Other forums

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...

function getTreeWithChildre

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

IF STATEMENT HELP
Hi
i have created a calendar from a table:

Code: Calendar: October 2009
<table w

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash