Hey all,
i have a little difficulty in understanding how to do some INSERT SELECT.
For instance i have two tables.
TABLE : users
id | name | gender
1 | John | m
2 | Mary | f
TABLE : website
fid | url | id
1 | www.desilva.biz | 2
2 | gidhelp.com | 4
Now let's say i want to add anoth...
Select col1 FROM mytable WHERE ValidUntil > 7/9/2009 8:45:30 pm
and the error is Incorrect syntax near '8'.
So what is wrong with this sql statement?
I tried this directly on SQL management studio...
...
I'm using MySQL.
I have a table which looks like that:
id: primary key
content: varchar
weight: int
What I want to do is randomly select one row from this table, but taking into account the weight. For example, if I have 3 rows:
id, content, weight
1, "some content", 60
2, "other content", 40
3, "something", 100
The first row has 3...
Hi,
I have a list of items like how its listed below, and I'm trying to get that option selected by default which has a certain tag within the "listing" tag.
<select>
<xsl:attribute name="name"><xsl:value-of select="@id"/>_type</xsl:attribute>
<option><xsl:attribute name="value"><xsl:if test="listing/Chat"><xsl:attribute name="selecte...
Hiya all, I'm really stuck .. I need urgent advice :D here is my html :
<!-- Beginning of ROW !-->
<div id="row1">
<div id="entry">
free
<span>some text</span>
<p>DKK</p>
<input type="radio" name="red<% Response.Write(counter); %>" id="radio" value="0" />
</div>
<div id="entry">
week
<span></span>
<p>DKK</p>
<input t...
using select query convert columns data as particular column only using select query
...
I essentially have the same situation as the person in the following question:
Link: how to show/hide divs by select.(jquery)
Through extensive searching within Google I was able to come up with several different methods in which people claim their method works. I have yet to get any to work correctly yet. I don't yet know enough about...
<select id="target">
<option value="1">...</option>
<option value="2">...</option>
</select>
...
How can I get all products from customers1 and customers2 include their customer names?
customer1 table
cid name1
1 john
2 joe
customer2 table
cid name2
p1 sandy
p2 linda
product table
pid cid pname
1 1 phone
2 2 pencil
3 p1 pen
4 p2 paper
Result should be like this
pid cid pname name1 name2
1 1 phone ...
Hello,
I would like to select text on the page by simulating a left mouse button down and drag it to a specified x,y location (in pixels)
Can this be done with JavaScript?
Thank you.
...
I have a drop down menu with options 'text,text area,drop down ,email' etc. I also have a list of links like text ,text area etc. When I click these link,the corresponding html element is created. i.e, if I click text, a text box is created. And if I click text area,a text area is created.
Now I want the option selected in the drop do...
How can I make a programmatical page selection visible to the user, as if it was selected by the user?
var range = document.createRange();
var startPar = [some node];
var endLi = [some other node];
range.setStart(startPar,13);
range.setEnd(endLi,17);
Thank you.
...
Hi All,
I want to display an image in the options of select box.
How can i do it in javascript/jquery in CHROME.
image text
...
Hi,
I'm having troubles with MySQL queries in Ruby. I use 'mysql' gem.
Configuration is stored in a separate yml file and loaded into @conf variable.
This is my code:
# connect to the database
Mysql::new(@conf['sql_host'], @conf['sql_user'], @conf['sql_password'], @conf['sql_base'])
# it's ok when we're doing this
my.query("SELECT * ...
I am trying to select data from a table, using two date fields (startdate and enddate). With both date fields in the where clause no results are returned, with the startdate field taken out results are returned, what is going on? Can anyone help with this dilemna
My code is:
SELECT WPP.USERID,
WPI.EMAIL,
WPI.FI...
I'm a little new to SQL and have come across the following problem.
I have a table with company details on it which is joined to a contact table by an enqID.
Within the contact table, there are 4 different types of contacts which may or may not have an entry. These are differentiated by a ctcTypID (1 - 4)
I would like to produce a qu...
I have a select Menu with a few options
<p>
<%= f.label :reason %><br />
<%= f.select :reason, Confirmation.reasons.collect {|p| [ p[:name], p[:id] ] }, { :include_blank => true } %>
</p>
The last being id "5" and name = "Other"
If and only if they choose other I want a hidden text_area with a div id = "other" to be shown...
I set up some jQuery tabs to start off with no tabs selected like this:
$('#tabs').tabs( { selected: -1 } );
Then I also have a separate link that when pressed needs to deselect all the tabs.
$("#deselectButton").click(function(){
$('#tabs').tabs( 'select' , -1 )
});
or
$("#deselectButton").click(function(){
$('#tab...
I have a dropdown box which lists a set of logos,like flower,butterfly etc.
<p class="title1">Logo</p>
<select name="logoMenu" class="select" size="7">
<?php foreach($logos as $logo):?>
<option id="<?php echo $logo['Subproperty']['id'];?>" value="<?php echo $logo['Subproperty']['values'];?>"><?php echo $logo['Subproperty']['values...
My DBA has constructed me a stored procedure in a Sybase database, for which I don't have the definition.
If I run it, it returns a resultset with a set of columns and values. I would like to SELECT further to reduce the rows in the result set. Is this possible?
From this question it seems like I could insert the results into a temporar...