What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP - die function

PHP - die function
Author: Message:
andrewdodd13
Senior Member
****

Avatar
Oh so retro

Posts: 870
Reputation: 16
34 / Male / Flag
Joined: Jan 2005
RE: PHP - die function
This is what I'd use (off the top of my head):

code:
$query1 = "update referals2 set amount=(amount+1) where website='$referal'";
$query2 = "insert into referals2 values('','$referal','')";

mysql_query($query1) or die ("Failed to update the database, this is a connection / database not exist problem.");

if (mysql_affected_rows() == 0) {
mysql_query($query2) or die ("Failed to insert new record, this is a connection / database problem.");
}

You'll probably also want to query query1 after query2, if I get the way your thing works :)
[Image: AndrewsStyle.png]
07-04-2006 08:50 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP - die function - by absorbation on 07-03-2006 at 04:50 PM
RE: PHP - die function - by Plik on 07-03-2006 at 05:10 PM
RE: PHP - die function - by absorbation on 07-03-2006 at 05:11 PM
RE: PHP - die function - by absorbation on 07-03-2006 at 05:18 PM
RE: PHP - die function - by WDZ on 07-04-2006 at 03:42 AM
RE: PHP - die function - by andrewdodd13 on 07-04-2006 at 08:50 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On