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'");
#12

[eluser]Salvatore Formisano[/eluser]
Great, that worked out perfectly.

Many thanks mate,

Salvatore




Theme © iAndrew 2016 - Forum software by © MyBB