Welcome Guest, Not a member yet? Register   Sign In
If user ID exists in database, UPDATE. Otherwise, INSERT (HELP)
#6

[eluser]CroNiX[/eluser]
Look at the logic in this line:
Code:
if($query -> num_rows() == $userid)
So if the user ID is 234234 you will need to have that many rows returned in your query for it to trigger your code.
probably should be
Code:
if($query -> num_rows())
which means if you get ANY results, the subscription already exists.


Messages In This Thread
If user ID exists in database, UPDATE. Otherwise, INSERT (HELP) - by El Forum - 11-05-2012, 07:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB