mysql_affected_rows() usage
Posted on
16th Feb 2014 07:03 pm by
admin
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP function.
Seems as though mysql_affected_rows() is not returning the desired number so I can move into my if statement.
This is just a snippet. Let me know if more code might be needed to diagnose.
Code: <?php
dbconnect();
$sql = "INSERT INTO `registration` (`id`, `the_date`, `first_name`, `last_name`, `email`, `phone`, `street_address`, `city`, `state`, `zip`, `emergency_contact`, `emergency_phone`, `high_school`, `test_score`, `major_interest`, `gpa`, `activity1`, `activity2`, `activity3`, `activity4`, `recruitment`, `recruitment_explain`, `travel`, `language`, `language_years`, `rotc`, `interests`, `accommodations`, `pay`) VALUES (NULL, '{$the_date}', '{$first_name}', '{$last_name}', '{$email}', '{$phone}', '{$street_address}', '{$city}', '{$state}', '{$zip}', '{$emergency_contact}', '{$emergency_phone}', '{$high_school}', '{$test_score}', '{$major_interest}', '{$gpa}', '{$activity1}', '{$activity2}', '{$activity3}', '{$activity4}', '{$recruitment}', '{$recruitment_explain}', '{$travel}', '{$language}', '{$language_years}', '{$rotc}', '{$interests}', '{$accommodations}', 'N')";
$result = mysql_query($sql) OR DIE ('//INSERT error<br />Please report this to the site admin <a href="/contact/index.php">here</a>.<br /><br />'.mysql_error());
if (mysql_affected_rows($result)==1)
{
//send email
?>
No comments posted yet
Your Answer:
Login to answer
279
36
Other forums
Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and
I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want
Read from a text file after a specific word
Hi all.
I have a text file that looks like the one below.
I know how to open the text fi
PHP Thumbnail Creation
Ok so i use this function to create thumbnails:
Code: [Select]function createthumb($name,$fil
Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every
retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th
Significance of BPM
Hi Experts,
I am a novice in BPM , I just want to know how BPM as permenant department is
Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will
Table colours fail when extra row added
Hey Gurus,
I got a weird problem with formating the colour of a table made in php. Everything
Multi dimensional arrays
If I put in this code:
1
2
3
4
5
6
7
8
9
10
11
12
13<