Re: [PHP-DB] how to get the referrer page details
Am Donnerstag, 15. Juni 2006 15:46 schrieb Manoj Singh: Now i came to know that this variable is not supported by some servers or it can be set off in php.ini setting. So can any one help me doing this without using $_SERVER['HTTP_REFERER']. That how the things are. Sometimes others do not act like one likes to. You should respect that some individuals do not want you to get that information. I bet, that is not really a big thing, isn't it? Best Regards, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Inserting Data into MySQL database
Am Donnerstag, 15. Juni 2006 22:42 schrieb Girish Agarwal: Hi All, I have a table in mySQL database 5.0 the structure of which is as follows ssno INT 9, lname VARCHAR(15) NOT NULL, fname VARCHAR(15) NOT NULL, I am inserting the values using $query = insert into student (ssno,lname,fname) VALUES ('.$student['ssno'].','.$student['lname'].','.$student['fname'].'); $query = INSERT INTO student (ssno,lname,fname) VALUES (12345,'',''); This Query is working Fine but the only Problem I have is that if the lname and fname values are NULL then how come it does not return an error but instead adds the record into the database. You pass emtpy strings. ('') Try this $query = INSERT INTO student (ssno,lname,fname) VALUES (12345,NULL,NULL); Best Regards, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Charset/SQL
Hi list, I get data from an HTML page that has charset UTF-8 (meta-element) and the table has $encoding=mysql_client_encoding(...). Now I do a $result = mysql_query(iconv(UTF-8, $encoding, $sql), $db_handle); to change encoding of user data. $sql is the complete SQL query. Might there be any problem that this code is not aware of? (I know that I implicitly assume that the code can be converted from utf8 to $encoding which is ISO-8859-1 for the database used. MySQL has Version 4.0.24) tia, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL: Load Data Infile
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]: Greets, I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','; The stuff in the parentheses causes an error but without the parens, it's inserts OK. I'm sure I've done this in the past, but is was long ago. Anybody have an insight into this? David (yes, it's more MySQL than PHP related, but I'm not currently subscribed to that list...) Sometimes a look into the manual is helpful! /mysql manual By default, when no column list is provided at the end of the LOAD DATA INFILE statement, input lines are expected to contain a field for each table column. If you want to load only some of a table's columns, specify a column list: LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...); You must also specify a column list if the order of the fields in the input file differs from the order of the columns in the table. Otherwise, MySQL cannot tell how to match input fields with table columns. /mysql manual http://dev.mysql.com/doc/refman/4.1/en/load-data.html Best Regards, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sending filing attachments using PHP
Am Freitag, 12. Mai 2006 00:33 schrieb Ron Piggott (PHP): Does any one know how to send a file attachment using PHP? You need to reformulate the problem. Does any one know how to create a mime/mulipart message with php? http://www.php.net/manual/de/function.imap-mail-compose.php Best Regards, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php