I need to select some auto incremented ids out of a database and then use those id in a where statement which updates the database at the id's location the below code works up to the update statements where it just dies without coughing up an error or anything......can you spot whats wrong and help me fix it?
Code: $current = Array();
$currsel = mysql_query("select id from page0.page0 where refnum ='$newnum' AND username!='admin'")
or die(mysql_error());
while($currrow = mysql_fetch_array($currsel)){
array_push($current,$currrow['id']);
}
print_r($current);
$current1 = Array();
$currsel1 = mysql_query("select id from page0.page0 where refnum ='$oldnum' AND username!='admin'")
or die(mysql_error());
while($currrow1 = mysql_fetch_array($currsel1)){
array_push($current1,$currrow1['id']);
}
print_r($current1);
$upref1= mysql_query("update page0.page0 SET refnum='$newnum' where id='$current[0]' OR id='$current[1]'OR id='$current[2]'OR'id=$current[3]'")
or die(mysql_error());
$upref11= mysql_query("update page0.page0 SET refnum='$oldnum' where id='$current1[0]'OR id='$current1[1]'OR id='$current1[2]'OR id='$current1[3]'")
or die(mysql_error());
mail() problem
Hi Guys,I've set up a contact email form. It sends the information fine, but it sends it to the junk folder.If I just use this command:$headers = "MIME-Version: 1.0 \n";It will send it to
Storing/displaying image urls in a database?
HiBasically I have the following scenario:User chooses picture from list. Picture info is added into the db, including url.However I can't figure out how exactly i should be storing the url for the
ME54/ME54N Conditional check for Release of PR
Hi Gurus,
please fix the error
What is the error in the below code ???Line number On/Off | Expand/Contract <?php if(array_key_exists_r('email|password', $_POST)) { include_once('database.php');
cyrillic string conversion question
Hello,
Beginners syntax and loop questions - help please!
Hi everyone,I have some problems with php code. I'm currently in the middle of learning php, but these problems have got me stuck fast. But also have a question regarding looping that i'll ask in the
Save file by click
Hello. I'm not understand how to save file from page. I'd like make link to file with save ability.<?phpchdir('upload/');foreach (glob("*.*") as $filename) { $uploadfile =
How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process results. If a user wants to go to another page (by clicking on the top menu) the browser locks up till
SELECT * FROM users WHERE Users are not in Blocked
How do I select all users from users table where there users_id is not stored in the block table
Wierd if else problem
Hi guys, this probably aint wierd for you, but it seems like php is playin up to me. may b i missed something. so i'm kinda needing another set or may more sets of eyes. lol.this is the