Re: [PHP] move "if" logic from php into query

2007-04-27 Thread tg-php
In my data scrubbing function, I pass it a content type (phone, city, SSN, etc), do whatever scrubbing/filtering I'm going to do on that type of content, then after everything's done, then I do the mysql_real_escape_string() on it and return that to where the function was called. That way, ever

Re: [PHP] move "if" logic from php into query

2007-04-27 Thread Richard Lynch
On Thu, April 26, 2007 4:02 am, Sebe wrote: > i always use intval() on something i'm inserting into database that > *should* be a integer. i don't know if there is a difference or a good > reason to pick one or the other.. i'm not Richard so maybe he can > create > an interesting story for us on th

Re: [PHP] move "if" logic from php into query

2007-04-26 Thread Sebe
Chris wrote: Thufir wrote: I couldn't get the page to load when the logic for line 31, "($id == $_POST[recordID])", was in the query. Can the logic for that be moved to the query? I expect so. $query = "SELECT contacts.id, px_items.id, title, notes FROM contacts, px_items WHERE contacts

Re: [PHP] move "if" logic from php into query

2007-04-26 Thread Chris
Thufir wrote: I couldn't get the page to load when the logic for line 31, "($id == $_POST[recordID])", was in the query. Can the logic for that be moved to the query? I expect so. $query = "SELECT contacts.id, px_items.id, title, notes FROM contacts, px_items WHERE contacts.id=px_items.id

Re: [PHP] move "if" logic from php into query

2007-04-26 Thread Zoltán Németh
2007. 04. 26, csütörtök keltezéssel 08.28-kor Thufir ezt írta: > I couldn't get the page to load when the logic for line 31, "($id == > $_POST[recordID])", was in the query. Can the logic for that be moved to the > query? I expect so. > > I tried changing the where clause of the query, no go.

[PHP] move "if" logic from php into query

2007-04-26 Thread Thufir
I couldn't get the page to load when the logic for line 31, "($id == $_POST[recordID])", was in the query. Can the logic for that be moved to the query? I expect so. I tried changing the where clause of the query, no go. [EMAIL PROTECTED] ~]$ [EMAIL PROTECTED] ~]$ cat /var/www/html/insertCon