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
Facebook status update API
Hello,
So, I'm trying to create my first Facebook application with PHP.
Basic ideas fo
Multiple upload and Resize
I would like some help on my script I have the for my index.php
////
<html&
how to transport the Query and insfoset
Hi
I have created the query using SQ01........
How to created T-code for query..
Consuming third party Payment Gateway API from Procedure.
Hi All,
First of all i would like to thank all the people of the oracle forum for providi
Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s
Need help Updating SQL Server Express DB from c# :(
Please can anyone help with:-
1 How to sructure the strSelect statement.
2 How to instruct
str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa
$_POST
Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, Fo
Small problem with image resize script
Hi!
I am a little bit new to php and I have an issue installing an image resize script I down
Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I