[PHP-DB] is it possible to upload (binary) files to a mysql database?
Hello, Is it possible to upload binary files to a mysql database? I can't figure it out. This is what I did: I made a form like this: FORM ENCTYPE=multipart/form-data ACTION=upload.php METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=20 Send this file: INPUT NAME=attachment TYPE=file INPUT TYPE=submit VALUE=Send File /FORM My SQL Query is like this: INSERT INTO ALBUMS ('file') VALUES '$attachment' The field FILE is a type BLOB field. The first result I got in the database whas the tempdir+tempfile. After that I choosed to ad $attachment_name into the database. But only the filename is stored in the database. Is it not possible to store files into the database? What I did now in the script is copying the file $attachment_name to a share on the local network so that everyone can access files uploaded by users. This is not the meaning of it all, it should be stored in the database. Can somebody help me with this? Please reply me at: mailto:[EMAIL PROTECTED] (my e-mail at work) Thanks in advance. Sander Peters -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] creating a userdatabase with groups in PHP/MySQL
Hello, I have to make a loginprocedure for our intranet at my work. I have to create a userdatabase with users and usergroups ( like Windows NT/2000 User Manager and Novell). Before I start with this job I wonder if maybe somebody created already something like this in PHP/MySQL and I can just use it. (This user database is not the security from MySQL! but just a seperated userbase wich will look to a authorisationtable to determine WHO can enter WHAT part of the Intranet.) Or if you have some advise for me to create something like this, I'll be very thankfull! With greetings, Sander Peters The Netherlands -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] select rows from more than one table, how?
Hello, I want to make a query that will select rows from more than one query, does anybody know how to do that? I already tried this: SELECT * FROM table1, table2 WHERE (conditions) But I get a error with this query. I also looked at the mysql site for this case, but I didn't find any answer (I guess it's there but I just can't find it!) Can somebody help me? Thanks in advance! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] counting with CURDATE() - please help!
Hello, I want to add a variable numer of months to the current date CURDATE(). I thought it should be something like this: select (MONTH(CURRENT_DATE)+MONTH(2)) but i get NULL as a result. The purpose of this it to check which records with a experation date is earlier or later than today+2 months later. Can somebody please tell me how to do this? Thanks in advance -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] convert yyyy/mm/dd to mm/dd/yyyy, how?
Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] how to create html tables in php
Hello, I made a database with bookmarks, these bookmarks are catogarized by type. Now I want to display those bookmarks in tables by category. This works already fine. The only problem I have is that the tables are very difficult to handle. I want to make 4 tables in a row (so that will be 4 dif categories with bookmarks) and after that, the next table should start under the first one. Like this categorycategorycategorycategory xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx categorycategorycategorycategory xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx (x = a weblink ;-) The (dutch) website where you can find a full example for what I mean: http://www.startpagina.nl/ Can anyone help me with this please? Thanx! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] variable operators in queries
Hello, Is it possible to put variable operators in queries? I tried this (the real variable comes from a form) $Date_Operator =(=); sql=SELECT * FROM poeple WHERE age $Date_operator 20; $result_id = mysql_query($sql); It doesn't work like this. I also tried: sql=SELECT * FROM poeple WHERE age \$Date_operator\ 20 $result_id = mysql_query($sql); it didn't work either. Or should I use a have to make a IF-Then construction? If $Date_Operator == (=) then { sql=SELECT * FROM poeple WHERE age = 20 } etc... Can anybody help me with this? Thanks in advance! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]