473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

need sql query to update columns

columns in my table are rollnum name surname father mobilenum address
rollnum is primary key
nee sql query to update details in a php form... please give syntax... thanks in advance
Aug 16 '12 #1
6 1632
ariful alam
185 100+
here it is:

Expand|Select|Wrap|Line Numbers
  1. update <table name>
  2. set <column name>=<text to change>
  3. [, <column name>=<text to change>,...]
  4. where rollnum=<roll number to change data>
in box brackets is optional. if you need to update more than one column than you have to use that part without box bracket separating comma(,)'s each.

hope works for you. :)
Aug 16 '12 #2
i would like to link sql query with php form and need to submit them to database... but just not sql query
Aug 16 '12 #3
ariful alam
185 100+
Have a look @ http://www.w3schools.com/php/php_mysql_update.asp

Hope works for you. :)
Aug 16 '12 #4
i have to submit them using a form but not directly to database
Aug 16 '12 #5
ariful alam
185 100+
yea. you have to just create a HTML form that takes input those required data and post using <form>'s post or get method to a PHP page like that code above linked by clicking on submit button. After a successful/failed update query to database it will show you a message.
Aug 16 '12 #6
ariful alam
185 100+
Here is another example for you, what i described in post#6, before this post#7.

update-a-mysql-database-field-data-with-html-form-and-php/
Aug 16 '12 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Greg | last post by:
I need to send the result of a procedure to an update statement. Basically updating the column of one table with the result of a query in a stored procedure. It only returns one value, if it didnt...
3
by: Bill Clark | last post by:
I have about 20,000 records pulled from Excel that I need to update. What I need to do is run an update query that bascially says: If a field is null, update it with the previous record value of...
1
by: Anna | last post by:
I have a simple DataGrid that displays a list of characteristics and allows you to edit a description for each characteristic. The query that feeds this involves a join, as the characteristics and...
11
by: diablo | last post by:
Hi i need help with formulating a query that will update the a field on one table depending on the values from another for example i have a cart table: cartid, buyerid, productid, quantity ...
1
by: blade_in_exile | last post by:
hi all my query is either going to be so simple i should of seen the answer myself or tax everyone trying to get the answer so here goes i have a database that holds records for football teams ...
4
by: m.wanstall | last post by:
I have a crosstab query that compiles data for Months of the year. I have a stacked select query on top of that crosstab query that uses the latest 2 months data and exports it to a fixed length...
3
by: info | last post by:
Hi, I have one table name: art column: symbol_art price1 price2 ----------- ------- ------- AG-0001 20 40 AG-0001S null null
1
by: evilbungle | last post by:
Good Morning, Hopefully someone can help me with what I am assuming is a simple query that I simply can't get to work. I am new to using Visual Basic and I am using Visual Studio 2005,...
1
by: karuppiah | last post by:
Hi All, i need query,how to select last 3 month ,last 3wek,last 3 days , this last 3 month and 3 week should be friday, using sysdate from dual table, there is no exsting table, pls any one help...
1
by: Jmaes Wang | last post by:
Attached please find my code. I failed to query the blob column. Note the Paradox driver version is 4.0. The error is: Error code: -2146232009 Error msg: ERROR Too few parameters. Expected 1....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.