From: Dan Greene Date: December 11 2003 2:17pm Subject: RE: How to READ/WRITE directly on MyISAM data files ? List-Archive: http://lists.mysql.com/mysql/155499 Message-Id: <173F3593678D8C43801253DB73B9D7990164BFA8@vasvex.chelseainteractive.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable So if I follow you, you allow your clients to execute direct sql on the = database, both select and update, but _they_ simply don't want to see = the row id data? If that's the case, then too bad for them.... if they are capable of = writing sql, then they have to handle the result, or omit the field from = the query. The only other option is for you to truss up your = application interface, so that you give them an interface that shows = just the fields _you_ want them to see. They can't have their cake and = eat it too. > -----Original Message----- > From: St=E9phane Bischoff [mailto:Stephane.Bischoff@stripped] > Sent: Thursday, December 11, 2003 9:00 AM > To: 'Jay Blanchard'; MySQL (E-mail) > Subject: RE: How to READ/WRITE directly on MyISAM data files ? >=20 >=20 >=20 > Hello, >=20 > Here's an example : >=20 >=20 > I have a table named Product. >=20 > TABLE : PRODUCT > +-------------+-------------+-------------+-------------+----- > --------+ > | RowID | Name | Company | Price | =20 > Warranty | >=20 > | | | | | =20 > | > +-------------+-------------+-------------+-------------+----- > --------+ > | 1 | PC 1000 | MyCom Inc. | 1000.00 | =20 > 1 year | >=20 > | 2 | PC 1000 | MyCom Inc. | 1200.00 | =20 > 2 year | >=20 > | 3 | PC 1000 | MyCom Inc. | 1300.00 | =20 > 3 year | >=20 > | 4 | PC 2000 | MyCom Inc. | 1200.00 | =20 > 1 year | >=20 > | 4 | PC 2000 | MyCom Inc. | 1300.00 | =20 > 2 year | >=20 > | 4 | PC 2000 | MyCom Inc. | 1400.00 | =20 > 3 year | >=20 > | 4 | PC 3000 | MyCom Inc. | 1500.00 | =20 > 1 year | >=20 > | 4 | PC 3000 | MyCom Inc. | 1600.00 | =20 > 2 year | >=20 > | 4 | PC 3000 | MyCom Inc. | 1700.00 | =20 > 3 year | >=20 > | 4 | PC AR3 | SPCom Inc. | 1200.00 | =20 > 2 year | >=20 > | 4 | PC AR3 | SPCom Inc. | 1300.00 | =20 > 3 year | >=20 > | 4 | PC AR4 | SPCom Inc. | 1400.00 | =20 > 4 year | >=20 > +-------------+-------------+-------------+-------------+----- > --------+ >=20 > From My Server Side Application (C code) >=20 > I can Update my Rows using my RowID. >=20 > Example : "UPDATE TABLE product SET Price=3D"2000.00" WHERE = RowID=3D"3""; >=20 >=20 > But For My Client Side Applications : >=20 > User logs in my Client app. > User types in "SELECT * FROM product". > User does NOT WANT TO SEE RowID numbers. > User wants to see this output : >=20 > +-------------+-------------+-------------+-------------+ > | Name | Company | Price | Warranty |=09 > | | | | | > +-------------+-------------+-------------+-------------+ > | PC 1000 | MyCom Inc. | 1000.00 | 1 year | > | PC 1000 | MyCom Inc. | 1200.00 | 2 year |=09 > | PC 1000 | MyCom Inc. | 1300.00 | 3 year |=09 > | PC 2000 | MyCom Inc. | 1200.00 | 1 year |=09 > | PC 2000 | MyCom Inc. | 1300.00 | 2 year |=09 > | PC 2000 | MyCom Inc. | 1400.00 | 3 year |=09 > | PC 3000 | MyCom Inc. | 1500.00 | 1 year |=09 > | PC 3000 | MyCom Inc. | 1600.00 | 2 year |=09 > | PC 3000 | MyCom Inc. | 1700.00 | 3 year |=09 > | PC AR3 | SPCom Inc. | 1200.00 | 2 year |=09 > | PC AR3 | SPCom Inc. | 1300.00 | 3 year |=09 > | PC AR4 | SPCom Inc. | 1400.00 | 4 year |=09 > +-------------+-------------+-------------+-------------+ >=20 > I know there are ways to bypass this problem, but it involves=20 > much more > coding in my Delphi applications > on my Client side. >=20 > So my question is, Is there a way to hide a field from select=20 > statements. >=20 > Of course, if my user wrote "SELECT RowId, Name, Company,=20 > Price, Warranty > FROM product" > he would get the RowId in his query output. >=20 > Best Regards, >=20 > St=E9phane. >=20 >=20 > =20 >=20 >=20 > -----Original Message----- > From: Jay Blanchard [mailto:jay.blanchard@stripped] > Sent: 11 d=E9cembre, 2003 08:49 > To: St=E9phane Bischoff; MySQL (E-mail) > Subject: RE: How to READ/WRITE directly on MyISAM data files ? >=20 >=20 > [snip] > Thank you, but I already know the basics of SQL SELECT statements. >=20 > What I am trying to say is, if a User writes a SELECT clause,=20 > I do not want > him to > see the RowID field. I do not want him to write a long SELECT=20 > statement, > especially if my > table has 20 FIELDS or more. (Can you imagine the user=20 > writing these queries > all the time). >=20 > I want him to be able to write SELECT * FROM ATABLE. > [/snip] >=20 > Well, that pretty much misses the point then, doesn't it? Are=20 > your records > not unique? There is no way that you can write an update=20 > statement that > would perform the operation on the proper record? Can you=20 > show us a bit of > the table? With more information we can help. >=20 > --=20 > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =20 > http://lists.mysql.com/mysql?unsub=3Ddan@stripped >=20 >=20