On Thu, Jul 16, 2009 at 5:40 PM, Miller,
Terion wrote:
> My little browse /search restaurant project is coming along, but I just
> noticed that any restaurant with a &, () or # in the name like say for
> example Arby's Store #12 ...will not return results... Yet if a name has a /
> or a - it's not
On Wednesday 11 June 2003 04:28, Steve Marquez wrote:
> I am inserting a file via a PHP form. It works great, however, if there is
> a word that has quotes in it, then it does not work at all.
>
> Is there a way to make it so that MySQL will receive a word with "quotes?"
mysql_escape_string()
--
You can use MySql's LEFT() or even substring()
example:
SELECT substring(address,1, 20) as _addr FROM tablename
and you will have to look for field "_addr" in mysql results.
-elias
http://www.kameelah.org/eassoft
""Jorn van Eck"" <[EMAIL PROTECTED]> wrote in message
9bkpd8$r77$[EMAIL PROTECTED
look into the substr() function in PHP
--Joe
On Tue, Apr 18, 2000 at 09:23:39PM +0200, Jorn van Eck wrote:
> Hi there,
>
> Does someone know how to display for example150 characters from a $ set by
> MySQL?
> --
> Jorn van Eck
> Student Information Engineering
> Almere
> Tel: +31 614430902
> E-
Hi,
to get the first 150 chars of a mysql filed do this:
SELECT LEFT(YourField, '150') FROM YourTable WHERE YourCondition=true;
This does it in MySQL and for PHP follow the mentioned substr-method.
cheers
Johannes
""Jorn van Eck"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bkpd8$r77$[EMAIL PRO
What exactly do you need?
If you have a variable that contains a string, you can do
echo substr($var,0,150)
to print the first 150 characters...
or, are you trying to limit the amount in the mysql query? I believe you
have to get the whole result then limit it in php, but others might know
better
6 matches
Mail list logo