2
Answers

Setting up mysql for use on a local area network

patrick

patrick

15y
3.2k
1
I need to set up mysql for use by 3-4 computers in a local area network.  I can't find a good reference on the subject.  Also, it will need to be accessed through c# on these computers - this is as simple as putting the ip address in the connection string, right?
Answers (2)
0
Marcel Hertel

Marcel Hertel

NA 54 0 14y
hi,

assume that you have the columns emp_id and emp_name in your emp-table you can use the following procedure:

create procedure sp_Sortdata
(
    @Orderbyclause varchar(50)
)
as
select
    *
from
    emp e
order by   
    case when @Orderbyclause = 'emp_id' then e.emp_id end asc
    ,case when @Orderbyclause = 'emp_name' then e.emp_name end asc
   
if you execute exec sp_Sortdata 'emp_id' the procedure returns the emp-table ordered by emp_id

i hope this helps

Marcel Hertel