Hello,

Here's an example :


I have a table named Product.

TABLE : PRODUCT
+-------------+-------------+-------------+-------------+-------------+
|    RowID        |     Name    |  Company    |     Price   |   Warranty  |

|             |             |             |             |             |
+-------------+-------------+-------------+-------------+-------------+
|       1         |   PC 1000   |  MyCom Inc. |  1000.00    |   1 year    |

|       2         |   PC 1000   |  MyCom Inc. |  1200.00    |   2 year    |

|       3         |   PC 1000   |  MyCom Inc. |  1300.00    |   3 year    |

|       4         |   PC 2000   |  MyCom Inc. |  1200.00    |   1 year    |

|       4         |   PC 2000   |  MyCom Inc. |  1300.00    |   2 year    |

|       4         |   PC 2000   |  MyCom Inc. |  1400.00    |   3 year    |

|       4         |   PC 3000   |  MyCom Inc. |  1500.00    |   1 year    |

|       4         |   PC 3000   |  MyCom Inc. |  1600.00    |   2 year    |

|       4         |   PC 3000   |  MyCom Inc. |  1700.00    |   3 year    |

|       4         |   PC AR3    |  SPCom Inc. |  1200.00    |   2 year    |

|       4         |   PC AR3    |  SPCom Inc. |  1300.00    |   3 year    |

|       4         |   PC AR4    |  SPCom Inc. |  1400.00    |   4 year    |

+-------------+-------------+-------------+-------------+-------------+

>From My Server Side Application (C code)

I can Update my Rows using my RowID.

Example : "UPDATE TABLE product SET Price="2000.00" WHERE RowID="3"";


But For My Client Side Applications :

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 :

+-------------+-------------+-------------+-------------+
|     Name    |  Company    |     Price   |   Warranty  |       
|             |             |             |             |
+-------------+-------------+-------------+-------------+
|   PC 1000   |  MyCom Inc. |  1000.00    |   1 year    |
|   PC 1000   |  MyCom Inc. |  1200.00    |   2 year    |       
|   PC 1000   |  MyCom Inc. |  1300.00    |   3 year    |       
|   PC 2000   |  MyCom Inc. |  1200.00    |   1 year    |       
|   PC 2000   |  MyCom Inc. |  1300.00    |   2 year    |       
|   PC 2000   |  MyCom Inc. |  1400.00    |   3 year    |       
|   PC 3000   |  MyCom Inc. |  1500.00    |   1 year    |       
|   PC 3000   |  MyCom Inc. |  1600.00    |   2 year    |       
|   PC 3000   |  MyCom Inc. |  1700.00    |   3 year    |       
|   PC AR3    |  SPCom Inc. |  1200.00    |   2 year    |       
|   PC AR3    |  SPCom Inc. |  1300.00    |   3 year    |       
|   PC AR4    |  SPCom Inc. |  1400.00    |   4 year    |       
+-------------+-------------+-------------+-------------+

I know there are ways to bypass this problem, but it involves much more
coding in my Delphi applications
on my Client side.

So my question is, Is there a way to hide a field from select statements.

Of course, if my user wrote "SELECT RowId, Name, Company, Price, Warranty
FROM product"
he would get the RowId in his query output.

Best Regards,

Stéphane.


 


-----Original Message-----
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 11 décembre, 2003 08:49
To: Stéphane Bischoff; MySQL (E-mail)
Subject: RE: How to READ/WRITE directly on MyISAM data files ?


[snip]
Thank you, but I already know the basics of SQL SELECT statements.

What I am trying to say is, if a User writes a SELECT clause, I do not want
him to
see the RowID field. I do not want him to write a long SELECT statement,
especially if my
table has 20 FIELDS or more. (Can you imagine the user writing these queries
all the time).

I want him to be able to write SELECT * FROM ATABLE.
[/snip]

Well, that pretty much misses the point then, doesn't it? Are your records
not unique? There is no way that you can write an update statement that
would perform the operation on the proper record? Can you show us a bit of
the table? With more information we can help.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to