View Full Version : can anyone answer this????
Rai_87
05-05-2008, 04:47 AM
if i have an sql table with some column such as userid, username, applicationid, companylogo etc..... the question is when any user login and change the info of the specify company. how should i write the select command.....
_Aerospace_Eng_
05-05-2008, 06:54 AM
Well each user should have their own unique userid. I'm not sure what you would need the SELECT query for. Either way you would need to use the WHERE clause.
SELECT * FROM tablename WHERE userid = $id
Where $id can be a get variable in the url. Be sure the check and see if they are logged in and that the id in the url matches the id in the database with their username and password.
Or an update
UPDATE tablename SET whatever = '$whatever'
Where $whatever is a php post variable from a form or something.
Rai_87
05-05-2008, 07:46 AM
what if i am using asp instead php, is it the same coding......
abduraooft
05-05-2008, 01:15 PM
what if i am using asp instead php, is it the same coding......
The basic logic would be same, but may vary in syntax.
Rai_87
05-07-2008, 03:03 AM
can anyone show me how to code using asp.net, pls help me..............cos i am a bit new to sql server!!!!
Fumigator
05-07-2008, 05:38 AM
Do you not have access to Google?
p.s. this is the MySQL forum, not the SQL Server forum.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.