View Single Post
  #1 (permalink)  
Old 03-03-09, 09:00 AM
perplexed's Avatar
perplexed perplexed is offline
Member
 
Join Date: Jan 2009
Posts: 43
Default 'select all' selects all NOOOOOOO!

I'm still having a mountain of baffling problems getting basic and simple scripts and queries to work with my new host here on WHUK.

These scripts have worker perfectly (and also instantly upon creation) with my previous hosts servers for the best part of a decade. WHUK are using the same MySql version as the scripts were coded.

Please can someone tell me, if it is me at fault, what is wrong with the following query. I wish to select all COLUMNS not all RECORDS in the database - which is exactly what it spews out.

Surely i don't have to replace the '*' with the name of every single column?. I'm using the same version and '*' is a perfectly valid shorthand to use.

PHP Code:
$sql=stripslashes ("SELECT * FROM table_name WHERE '$a' LIKE '%$b%' ORDER BY '$c'"); 

Last edited by perplexed; 03-03-09 at 09:02 AM.
Reply With Quote