Hi all,
I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_id BETWEEN '1' and '5' ";
$res = mysql_query($array);
$count = 0;
while ($row = mysql_fetch_assoc($res)){
if (is_int($count / 10) || $count == 0){
$rand_low = rand(1,5);
$rand_high = rand(1,5);
}
$num = rand($rand_low,$rand_high);
$update = "UPDATE stocks SET t_val=$num WHERE stock_id='" . $row['stock_id'] ."'";
if (mysql_query($update)){
echo "Updated record(s)<br />n";
}
}
Which simply updates a coloum called t_val with a random value between 1 and 5. I have another coloum in the table called y_val. What I would like to do is take the value of t_val before it is updated with the new rand and save it to the y_val coloum. How would I do this?
Many thanks
POST into Array problem
Hi Chaps,I have a repeat region, displaying rows of data: jobid, fromtable, translatorchargeIn each row there is an input field to enter a cost for each job 'charge'.//INPUT - TRANSLATOR CHARGECode:
email CODING Problem
Email coding problem.I need to send a section of the info to $tf and the same as a Cc to $email and also I need the full info to be sent to my@mail.com. how to do that?summery:only selected Info: name
Where is my php.ini???
HiFirst off - apologies - i'm not a coder so this may sound very amateur.I'm having an issue with files being uploaded via a submission form. Files under 2mb are fine. Files over 2mb are not. I've
phpmailer class & pop.gmail.com?
Code: <?php $mail->IsSMTP();$mail->Host = "pop.gmail.com";$mail->Port = 995;$mail->SMTPAuth = true;$mail->Username =
want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for upload but that is not working actually..i don't know what is the problem.when i upload a file and
Data storage spaces in varchar2
Trying to understand what's happening.
2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.1) on IE when i hit enter instead of the Submit button, i do not get any result. with firefox, no problem.2) when i hit submit or enter
Checking if field is empty AND using !is_numeric
Hi lads,Need to be able to display an error message (using isset?) that says "Cant leave field blank" when someone clicks on submit after leaving the field blank. The problem is that I'm
Check something, wait, check again, do something!
Hi guys. I wonder if someone can help me with this.Basically, what I want to do is (for arguments sake I will use google.com as an example) check to see if google.com is alive. If its alive, I want it
Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to the user. Everything works fine, except I am running into difficulties with dynamic links.The code