I am Looking for a Function that insert "Any" form values to mysql, update or delete.
(not OOP)
I have found a function here:
http://tr.php.net/manual/en/function.mysql-query.php
Thanks in advance
Hi,
I need to access the X,Y values of a vertex object after Ive rotated it (with glRotate3f). How is it possible? I need em to solve an object collision problem where collisions will be sending objects in an angle related direction based upon objects rotation degrees.
Thanks
i have:
With rs
.AddNew ' create a new record
' add values to each field in the record
.Fields("datapath") = dpath
.Fields("analysistime") = "atime"
.Fields("reporttime") = "rtime"
.Fields("lastcalib") = "lcalib"
.Fields("analystname") = "aname"
.Fields("reportname") = "rname"
.Fields("batchstate") = "bstate"
.Fields("instrument") = "NA"
.Update ' stores the new record
End With
when i check the database, it looks like it ONLY inserted the last field!
has anyone encountered this problem?
I would basically like to do the same as this question, but grouping by combinations of two values, rather than just one:
SELECT player_type, team, COUNT(*) FROM players GROUP BY player_type, team;
Does anyone know whether, and how, this is possible in Django? I'm using 1.2.
Doesn't prepare() escape any quotes(') in a PDO statement? For some reason when I do this:
$sql = "INSERT INTO sessions (id, name) VALUES (1,'O'brian')";
$query = $this->connection->prepare($sql);
$query->execute();
I get this error:
Could not insert record SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'brian'.
How could this be if I'm using prepare()?
I need my application to auto-complete on a company name, but also fill in a hidden form field with the ID of that company selected.
I believe it's possible to return pair values, with the pipe separator, such as........
Microsoft|10
Oracle|20
Sybase|30
And indeed this seems to work, but I don't know how to access the 2nd argument.
Need to get a value of an enumeration of a given string literal like "xlCenter" (these values are cut and pasted from Excel Macro).
I would like to retrieve the actual constant value (int) -4108="xLCenter" via com marshaling is this possible ? if so how ?
Ideally I am looking for function like this
public int ExcelConstant(string constantName)
{ ...}
Thanks
i m suffering with Passing values from javascript function to controller in cakephp and get using $_POST.
i have tried it by different ways but didn't get success please suggest........
hi,
I'm using the following lines to store the location of an object.
var lightboxTop = $('#lightbox').css('top');
var lightboxLeft = $('#lightbox').css('
left');
I'm successively moving this object in my element, and I want to restore it previous position with the stored variables.
But, I'm afraid javascript is saving the values by reference so I lose the initial positions. Am I correct ? How can I solve this ?
thanks
I need to populate the first box with the items from a db table. Users would choose from the first box, and either drag value(items) to the second for selection, or would select items, and then click a button to move them over to the 2nd box. After that I need to update the db with the selected values/items.
I have a class
class a
{
private Dictionary <int , string> m_Dict = new Dictionary<int , string>();
}
from some other component/class need to add values to the m_Dict dictionary using reflection! How do i do it ? i searched and tried but was not successfull.
Dunno why it is...heres the coding for it.
http://pastebin.org/301343
I know theres a lot of repetitiveness in the coding...but its because the arrays were retuning null so I got tired of messing with them.
Everything works until it reaches line 224, which returns null values.
Hello, I have a table with OWN_ID and OWN_Email -
3ace7cf80edd | [email protected]
3acf6af33ff7 | [email protected]
3acda2524e00 | [email protected]
3ad75583c9a7 | [email protected]
3ad74b018999 | [email protected]
etc.
the problem is that it should contain only a single ID per Email, also I need to replace all OWN_ID values in another table by highest OWN_ID value of the OWN_Email
putStrLn "Enter the Artist Name"
art <- getLine
putStrLn "Enter the Number of CD's"
num <- getLine
let test= buyItem currentStockBase art num
printListIO (showcurrentList test)
the values i have to pass for buyItem is
buyItem currentStockBase "Akon" 20
but i want to send "Akon" to art and for 20 i want to send num
it gives me this error
ERROR file:.\Project2.hs:126 - Type error in application
*** Expression : buyItem currentStockBase art num
*** Term : num
*** Type : [Char]
*** Does not match : Int
please help me
Using prototype, is there a simple method of checking that a group of values match, for example - can this code be refined to a single line or something otherwise more elegant?
var val = '';
var fail = false;
$('form').select('.class').each(function(e){
if(!val){
val = $F(e);
}else{
if(val != $F(e)) fail = true;
}
});
How can I scale a set of values to fit a new range if they include negative numbers?
For example, I have a set of numbers (-10, -9, 1, 4, 10) which have to scaled to a range [0 1], such that -10 maps to 0, and 10 maps to 1.
The regular method for an arbitrary number 'x' would be:
(x - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
but this does not work for negative numbers. Any help is appreciated. Thanks!!
With this query, I get a result that is two short of the table because they are not included in count, and I would like get the NULL values in the result. To do this, I am pretty sure I need to use a subquery of some kind, but I am not sure how, since the attribute in question is an aggregate.
SELECT Equipment.SerialNo , Name, COUNT(Assignment.SerialNo)
FROM Equipment
INNER JOIN Assignment
ON Assignment.SerialNo = Equipment.SerialNo
GROUP BY Equipment.SerialNo, Name
Hi ,
I have country table,
i fetch all values and moved into array ,
these value i like to populate into combo/dropdown list ,
here i want to do some magic things,
that is , for my site most of the users coming from uk,us,Australia,Romain and few,
So i like to populate by my preference ,
is there any array will do this magic work, else is it possible mysql query ,
So final question is ,
Populate country name into combo based on my prefernce ,
Thanks
Hi,
Being quite new with PHP, I cannot find any solution why this does not work. The query is OK and the resource is returned. But I dunno why fetch_assoc does not print values. Thanks
$query=sprintf("SELECT ID,NAME FROM USERS WHERE PASS='%s' AND NAME='%s'",mysql_real_escape_string($p),mysql_real_escape_string($n));
$result=mysql_query($query);
if ($result)
{
while ($row = mysql_fetch_assoc($result)) {
echo $row['ID'];
echo $row['NAME'];
}
}
}