Welcome Guest, Not a member yet? Register   Sign In
Updating a unique field in database (example: account username or email)
#11

[eluser]sophistry[/eluser]
um, i dont' think that would work...

try just getting the result into a variable and using it in the query.
Code:
$id = $CI->input->post('fieldname');
$query = $CI->db->query("SELECT COUNT(*) dupe FROM $table WHERE $column = ‘$str’ AND id != '$id'");


Messages In This Thread
Updating a unique field in database (example: account username or email) - by El Forum - 12-11-2009, 01:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB