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

Delete all files in folder except with certain name
I have a script that I want to delete all files in a folder (taken from a database) except for one n

Most basic form question ever?
Hello,

I want to use this snippet to make sure the fields in a form are ok before processing

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Upload file and add HTML
Hey everyone,

I have a client has meeting agendas and minutes that should be posted online. I

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

check if string contain only a-z/A-Z
Is where any way to check if string contains only a-z/A-Z, without writing an array with all possibl

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