[PHP-DB] mysql error...

2007-08-28 Thread John Pillion

this is bugging me to no end (no pun intended)...  I am getting the error:

invalid query: You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to 
use near 'Condition, ConstructType, BldgDimensions, Stories, 
CurrentParking, MaxParking, P' at line 1


I cannot find a thing wrong with this...  any ideas what may be the 
problem? All the data types are either int(11) or varchar(50).


John



INSERT INTO tblBuildings (SiteID, Name, Available, MfgWHSqFt, 
OfficeSqFt, TotalSqFt, MinSqFtAvailable, MaxSqFtAvailable, Condition, 
ConstructType, BldgDimensions, Stories, CurrentParking, MaxParking, 
ParkingSurface, PctOccupied, ClearSpan, CeilingMax, PctAC, PctHeated, 
FloorType, Sprinkled, DHDoors, DHSize, GLDoors, GLSize, RRDoors, RRSize, 
CraneNum, CraneSize, RefrigSize) VALUES ('', '[enter building name]', 
'Y', '', '', '', '', '', '- Select -', '- Select -', '', '', '', '', '- 
Select -', '', '', '', '', '', '- Select -', 'Y', '', '', '', '', '', 
'', '', '', '')


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] indexing error - key length not specified

2007-02-09 Thread John Pillion
I am trying to set an index on a field in my table, but am getting the
following error:

 

BLOB column 'ReadBy' used in key specification without a key length

 

The fieldtype is blob, though I get the same error whether blob or text, or
the medium and long versions of each.  My first though, based on the error,
was I needed to set a length to the field - but it won't accept/store any
length I give it (because it's a variable length?)

 

I'm using mysql on from 1and1 (hosting provider), though I don't know what
version they're running

 

.. any thoughts?

 

 

As an alternative, how much less efficient would it be to do a .LIKE
'%mystring%' versus a MATCH..?