From: Dennis F. <de...@co...> - 2002-10-22 09:03:46
|
Hi François, Well I would suggest you do it another way :/ First of all call the query-function db_query(); that way you can include different files for different database types and still have all you calls the same. (eg. i can now also create an oracle include file that has the db_query(); ) And second the database is selected at connection time. most likely you meant to use the defined variable DATABASE_NAME and not it's variable variant $DATABASE_NAME. (so use the one without the $). But as said before I would not advise to include it in every function all. As you can see in the query there are a LOT of non SQL'92 comaptible functions like: current_timestamp() extract() You will need to work around them in code. In anycase it'll be probably be more difficult then just replacing the function calls. Thanks, good luck and don't give up, Dennis Fleurbaaij de...@co... ----- Original Message ----- From: "François TRICARD" <fra...@so...> To: "Dennis Fleurbaaij" <de...@co...> Sent: Tuesday, October 22, 2002 9:20 AM Subject: RE: Core/Org -> mySql ... Help Hello Dennis ! My first big problem is the following request, do you know how to port it in mysql ? q = mysql_db_query( $DATABASE_NAME, "SELECT user_id, ip, email, admin, fullname, current_timestamp(0) AS now, lastaccess, extract( epoch FROM (current_timestamp(0) - lastaccess) ) AS sec_lastaccess FROM users LEFT JOIN logins ON (logins.user_id=users.id) WHERE session_key='".$x."'", $database_connection ) ) ) (From security.php) Thanks François -----Message d'origine----- De : Dennis Fleurbaaij [mailto:de...@co...] Envoyé : lundi 21 octobre 2002 11:16 À : François TRICARD Objet : Re: Core/Org Hello François, There is _NO_ mysql port. Mysql lacks features that Core/Org depends on. - Subqueries ( could be fixed by rewriting all subqueries to joins or wait for a mysql that supports it. ) - References ( not a neccesity but you do want security on the database layer ) So unfortunately there is no support yet. If you are interested in building that I would help as I've allready did it once but lost the code. The developement path would be: - get rid of all the pg_calls and replace them by calls to our own database object. - build a postgresql and a mysql database object - config it in in al 4 hours work or less. Greetings, Dennis Fleurbaaij de...@co... ----- Original Message ----- From: "François TRICARD" <fra...@so...> To: <de...@co...> Sent: Monday, October 21, 2002 10:38 AM Subject: Core/Org Hello, Your web's soft is very good for groupware, but I'm just a php/mysql user... Do you know is someone is working on Core for Mysql ? Thanks, François TRICARD |