PHP/MySQL Query Database with Variable number of fields

Dan Kressin dkressin-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Wed Nov 3 12:56:18 EDT 2010


--- On Wed, 11/3/10, Dan Kressin <dkressin-/E1597aS9LQAvxtiuMwx3w at public.gmane.org> wrote:
> 
> if (isset($field1)) $fields_arr[] = $field1;

D'oh!  Clearly that should to be:

if (isset($field1)) $fields_arr[] = "dbfield1='$field1'";

or whatever the MySQL format is..

-Dan


      





More information about the Discuss mailing list