SQL. Backticks force reading the string as a SQL object (db, table, column), as opposed to a string.
Eg you could in theory have columns called "select" or "Mes Documents", and do: SELECT * FROM `select` AS S, `Mes Documents`AS MD ... of course it is wholly unadvisable to do so. Best to steer clear of reserved words and use well-formed names, with a clear naming convention. Then you won't need backticks. HTH Ignatius _________________________ ----- Original Message ----- From: "pete M" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 06, 2003 1:58 PM Subject: Re: [PHP-DB] Select Value with 's > why the backticks and not quotes ????? > > pete > Ma wrote: > > > hi! > > > > do not quite understand your problem.. pls post some code? > > heres a small snippet that should work well... > > > > $qry = 'SELECT `customer` FROM `customerList` ORDER BY `customer`'; > > $res = mysql_query($qry); > > while($customer = mysql_fetch_object($res)) { > > echo stripslashes($res->customer).'<br>'."\n"; > > } > > > > hth? > > > > _ma > > > > # life would be easier if i knew the source code... > > > > > >>Von: "Aleks @ USA.net" <[EMAIL PROTECTED]> > >>Datum: Wed, 5 Nov 2003 13:12:45 -0500 > >>An: <[EMAIL PROTECTED]> > >>Betreff: [PHP-DB] Select Value with 's > >> > >>This is a basic question but I am all messed up and need to be straightened > >>out.. > >> > >>Have a select field called customer that works great except when there is a > >>' in the customer name. > >>Have tried addslash and stripslashes but I think I might be using them > >>wrong. > >> > >>If I addslash to the select value, the value received but the result page is > >>truncated up to the point of > >>the ' ..... > >> > >>Can someone refresh me on the correct use of add and strip slashes... > >>please?? > >> > >>Thanks > >> > >>Aleks > >> > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php