I am working on two really simple functions that automatically generate (and execute) insert and update mysql queries and I have some questions:
Can there be any problems later on if functions treat numeric and string values the same? The function reports error if some value is neither numeric nor string (checked by using is_numeric and is_string functions), otherwise it just uses mysql_real_escape_string on all values in array and adds '' everywhere. Unlike microsoft access, mysql doesn't seem to care if you put '' on numeric value.
The simplest usage of insert function (for form data entry) would be:
db_insert('users', 'name,e_mail,bio', $_REQUEST);
First argument is table, another is the list of fields (separated by comma) , and third is the associative array of data that you want to insert.
Can you notice any problems?
mysql_query returning boolean instead of mysql ressource
Hi,I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the query in a string format (SQL is working properly) and a database ressource which is also good. The problem is
simplexml_load_file and rss problem
Hi,I have a problem parsing an rss feed using simplexml_load_file - this is strange as i have used the same code to parse literally 1000s of different feeds in the past, and even stranger in that if i
update 2 columns by doing inner 2-column query
Hi,
SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance in writing a custom function for it, anyone ever messed with it before?
MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an error... and was hoping someone could help me out.You have an error in your SQL syntax; check the manual
PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.I have a CMS and on the actual website I am building I have a nice little slideshow script that runs through all the images in a
FROM_UNIXTIME($phpdate);
Hello, I tried to use this : $date = FROM_UNIXTIME($phpdate); ANd I was told that FROM_UNIXTIME() is an 'unidentified function'. Any ideas why this might be? I've used it before with no problems.
Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 application. Similar to when in Outlook and sending an attachment, you can select either a file, or an
losing variables between php brackets
Hihave got this code:Code:
how to get IP address?
hey guys,i have this code which is supposed to get me the IP address of my site visitors:Code: <?php if ($_SERVER['HTTP_X_FORWARD_FOR']) {$ip = $_SERVER['HTTP_X_FORWARD_FOR'];} else {$ip =