how to make database item unique


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

Hey guys,

is it possible to do this:

Did you know?Explore Trending and Topic pages for more stories like 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

Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser

Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyon

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

check how many commas the variable containing the query has between [i]select[/i
Hi...

iv made an sql table that contains id number - name of sql query and an sql query.
T

login box shows up again after logging in 2nd login works
Hello,

I am having trouble on my site Lockerz.rack111.com where when you login the login box

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

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