如何插入到mysql数据库并使用相同的函数结果加载到<select> - > <option>?

I'm interested about Jquery and ajax to use with php&mysql.

I have been reading articles about loading intervall like 10 seconds. But that is not working with my page. (in select with 1000ms loading does load data every one second and unselects my option -box (i dont have idea how can i load that only if content changes..))..

I have page:

 <input type=text name=add_version value=>
 <input type=submit name=add value=add>

and

<select name=version>
<option><option>
<option value=1>v1.0</option>
<option value=2>v1.1.0</option>
</select>

How can i insert with ajax that "add_version" and load that same data to with one "submit" button?

or

does somebody have result for that loading content only when data changes in my MySQL DB?

thanks for help!

With your comment clarification, I think you're looking for Long Polling. There are plugins that can do that for you, but I'm not sure how you want to go about it, so here are a couple of places to start looking at how you can.

Was doing some additional research, and came across this most excellent tutorial about using node.js