From: Charlie S. <Sm...@ld...> - 2003-09-24 16:09:02
|
I'm starting a project to give us an oracle interface ie. replacing mySQL = calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> Dear all, I'm going to use phpESP for a project inside a big tyre company. However, = I'll=20 need to interface it with Oracle through ODBC. So, what do you think is=20 better : - use normal ODBC (iODBC, unixODBC) - use PEAR libs Personally, I prefer ODBC because I read very poor benchmarks for PEAR=20 database access. Any suggestions ? Stefan ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf=20 _______________________________________________ phpESP-devel mailing list php...@li...=20 https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Charlie S. <Sm...@ld...> - 2003-09-24 18:00:32
|
So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword, = $oracleSid); you could have: =66unction genDBConnect($genDBSid, $genDBUser, $genDBPassword) { if (DB =3D=3D 'Oracle) { $connected =3D @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); if($error =3D OCIError()) { die("<font color=3Dred>ERROR!! Couldn't connect to server!</font>"); } return $connected; } else if (DB =3D=3D 'MySQL' { mysql_connect($genDBSid, $genDBUser, $genDBPassword) } } Something like this? along with other generic functions to handle each of = the mysql/oracle functional pieces? >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> This does sound good. But instead of porting to Oracle, a port to PEAR or some other "generic" database abstraction layer would be even better. On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > I'm starting a project to give us an oracle interface ie. replacing mySQL= = calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. >=20 > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > Dear all, >=20 >=20 > I'm going to use phpESP for a project inside a big tyre company. However,= = I'll=20 > need to interface it with Oracle through ODBC. So, what do you think is=20 > better : >=20 > - use normal ODBC (iODBC, unixODBC) > - use PEAR libs >=20 > Personally, I prefer ODBC because I read very poor benchmarks for PEAR=20 > database access. >=20 > Any suggestions ? >=20 > Stefan >=20 >=20 >=20 > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf=20 > _______________________________________________ > phpESP-devel mailing list > php...@li...=20 > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 >=20 >=20 >=20 > This message may contain confidential information, and is intended only = =66or the use of the individual(s) to whom it is addressed. >=20 >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >=20 >=20 >=20 > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf=20 > _______________________________________________ > phpESP-devel mailing list > php...@li...=20 > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 >=20 --=20 mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Charlie S. <Sm...@ld...> - 2003-09-24 18:01:55
|
So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword, = $oracleSid); you could have: =66unction genDBConnect($genDBSid, $genDBUser, $genDBPassword) { if (DB =3D=3D 'Oracle) { $connected =3D @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); if($error =3D OCIError()) { die("<font color=3Dred>ERROR!! Couldn't connect to server!</font>"); } return $connected; } else if (DB =3D=3D 'MySQL' { return mysql_connect($genDBSid, $genDBUser, $genDBPassword) } } Something like this? along with other generic functions to handle each of = the mysql/oracle functional pieces? >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> This does sound good. But instead of porting to Oracle, a port to PEAR or some other "generic" database abstraction layer would be even better. On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > I'm starting a project to give us an oracle interface ie. replacing mySQL= = calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. >=20 > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > Dear all, >=20 >=20 > I'm going to use phpESP for a project inside a big tyre company. However,= = I'll=20 > need to interface it with Oracle through ODBC. So, what do you think is=20 > better : >=20 > - use normal ODBC (iODBC, unixODBC) > - use PEAR libs >=20 > Personally, I prefer ODBC because I read very poor benchmarks for PEAR=20 > database access. >=20 > Any suggestions ? >=20 > Stefan >=20 >=20 >=20 > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf=20 > _______________________________________________ > phpESP-devel mailing list > php...@li...=20 > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 >=20 >=20 >=20 > This message may contain confidential information, and is intended only = =66or the use of the individual(s) to whom it is addressed. >=20 >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >=20 >=20 >=20 > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf=20 > _______________________________________________ > phpESP-devel mailing list > php...@li...=20 > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 >=20 --=20 mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Stefan C. <sch...@ea...> - 2003-09-26 05:38:15
|
I don't know if anyone has ever tried to debug that piece of code, but well it wasn't very well written, to say the least. (PS: that was an ANGRY programmer comment, it's not intended to flame the author :) :)) stF |
From: Stefan C. <sch...@ea...> - 2003-09-29 04:55:28
|
Here is the source code of my modified version. (sorry for being angry last time, but damn, it was just toooo harsh :)) :) stF <?php # $Id: questions.inc,v 1.13 2003/03/05 19:26:38 jimmerman Exp $ // Written by James Flemer // For eGrad2000.com // <jf...@al...> // Almost entirely rewritten by Stefan Champailler (for clarity) /* echo("\$HTTP_POST_VARS['q']=".$HTTP_POST_VARS['q']); // selected question number (1 is the first, n is the last) echo(", \$HTTP_POST_VARS['id'] =".$HTTP_POST_VARS['id']); // question id ? // id is retransmitted each time the question edit is // submitted. what happens, if we're creating a new question // with errors in it, that is, one that hasn't any id. echo(", \$HTTP_POST_VARS['type_id']=".$HTTP_POST_VARS['type_id']); // question type id echo "<br>"; echo(", \$HTTP_SESSION_VARS['survey_id'] =".$HTTP_SESSION_VARS['survey_id']); echo(", \$HTTP_SESSION_VARS['last_tab'] =". $HTTP_SESSION_VARS['last_tab']); echo "<br>"; echo "\$updated ? $updated"; // survey id. // In case of "edit a survey", survey_id is made out of newid in // tab.inc */ /* Some constants that will soon be used */ $FIELDS = array('name','type_id','length','precise','required','content','position'); // Scary: name is not shown, but kept anyway... I made that to // avoid disrupting other code parts (esp. survey_update). $NEW_QUESTION_ID = "new_question_id"; $NEW_QUESTION_BUTTON = _("New Field"); // Sanitize if( empty( $HTTP_SESSION_VARS['survey_id'])) trigger_error( _("Empty survey id. This can't happen."), E_USER_ERROR); /* $sid is a /shortcut/ to $HTTP_SE..., it shall not be modified. */ $sid =& $HTTP_SESSION_VARS['survey_id']; /* We collect all the questions id's of the survey. This will soon be helpful. */ $sql = "SELECT id FROM question WHERE survey_id='$sid' AND deleted='N' AND type_id != 99 ORDER BY position"; // stF: 99 is page break $result = mysql_query($sql); $q_ids = array(); while(list($qi) = mysql_fetch_row($result)) array_push($q_ids, $qi); mysql_free_result($result); /* $HTTP_POST_VARS['id'] is the question we WERE working on at submission time and we'll set up $id which the question we ARE working on.*/ $id = "!!!unset!!!"; /* We define a little shortcut here ($q). Plese note that it preserves the nullity of POST_VAR[q] if necessary. */ $q=''; $q_post = $HTTP_POST_VARS['q']; if( $q_post > 0 && $q_post <= count( $q_ids)) $q = $q_post; elseif( !empty( $q_post)) $q = $NEW_QUESTION_BUTTON; unset($q_post); /* So, now the whole job is to get $id from $HTTP_POST_VARS['q'] and other things... When we say "were working on", it means that it was the id of the question that was displayed when the user submitted its modifications. The number of ways a page is submitted is given by the number of buttons on the page multiplied by the fact that the submission has or has not been accepted (because invallid values). Globally the schema is this : - we were editing $id, we clicked on something, our edition is valid and we can fall on the somthign that was selected. - we were not editing and we fall back where we should. - we were editing $id, we clicked on something, our edition is NOT valid and we must stay here. */ /* So first question, where are we coming from */ $coming_from_outside = $HTTP_SESSION_VARS['last_tab'] != 'questions'; $submitted_data_are_valid = (empty($HTTP_POST_VARS['content']) && empty($HTTP_POST_VARS['name'])) || $updated;; $request_for_new_question = $q == $NEW_QUESTION_BUTTON; $request_for_edit_question = $q > 0; $request_for_extra_choice = !empty($HTTP_POST_VARS['extra_choices']); $outside_requested_qid = -1; if( !$request_for_new_question && $q > 0) // So we avoid empty(q) $outside_requested_qid = $q_ids[ $q - 1]; /* echo "\$coming_from_outside = $coming_from_outside "; if( $coming_from_outside) echo "\$outside_requested_qid = $outside_requested_qid"; echo "<br/>"; echo "request_for_extra_choice = $request_for_extra_choice"; echo "<br/>"; */ /* Now that we know where we're coming from, we can see if we can fulfill user's request (that is, go where he wants to go). */ /* If true, then it's the first time that we display the form for the edited question. If false, it's not the first time, it means that the user has just submitted the question. */ $ignore_post_var = false; if( $coming_from_outside) { /* As we're not coming from outside, we're not working on any particular question. Therefore, we have several possibilities : - There's no question to work on (creating a survey) - There's a question and we want to edit it. So, are we working with a survey that has some questions in it ? */ if( count( $q_ids) > 0) { // Yes, at least one question. // Outside may have requested to work on a special question. if( $outside_requested_qid >= 0) $id = $outside_requested_qid; else // we decide to edit the first of the available questions. $id = $q_ids[0]; } else { // No, we're creating a new question $id = $NEW_QUESTION_ID; } $ignore_post_var = true; } else { // Coming from the inside if( $submitted_data_are_valid) { if( $request_for_new_question) { $id = $NEW_QUESTION_ID; $ignore_post_var = true; } elseif( $request_for_edit_question) { $id = $q_ids[$HTTP_POST_VARS['q'] - 1]; $ignore_post_var = true; } elseif( $request_for_extra_choice) $id = $HTTP_POST_VARS['id']; } else $id = $HTTP_POST_VARS['id']; } /* At this point, $id is in a defined state. That is, it is either a integer, representing an existing id, or it is set to $NEW_QUESTION_ID which means that we're editing a question that has still no ID (i.e. a new question) */ if( $id != $NEW_QUESTION_ID && !in_array( $id, $q_ids)) trigger_error( _("Unrecognized question id ($id)"), E_USER_ERROR); /* Now we are going to display the form. The job is to figure out the value of each of the field. The fields value are set/read in the HTPP_POST array. - If we're editing an existing question, then the values are to be taken from the HTTP_POST array. - If we're arriving on the edit screen for the first time (for an exisiting question), then the values are to be taken from the database. - If we're creating a new question, then all the fields are empty (and so are the HTTP_POST) - If we're editing a new question, then all the fields come from the HTTP_POST) */ $multiple_choices = array(); if( $ignore_post_var && $id == $NEW_QUESTION_ID) { // We clear, just to make sure that there's no garbage // in the POST vars. foreach($FIELDS as $f) unset( $HTTP_POST_VARS[$f]); for($i=0; $i<$GLOBALS['ESPCONFIG']['default_num_choices']; $i++) array_push( $multiple_choices, array( "id" => '', "content" => '')); // We set some defaults $HTTP_POST_VARS['required'] = 'N'; $HTTP_POST_VARS['type_id'] = 2; } elseif( $ignore_post_var && $id != $NEW_QUESTION_ID) { /* We load everything from the DB. */ $sql = "SELECT * FROM question WHERE id='${id}' AND deleted='N'"; $result = mysql_query($sql); $question = mysql_fetch_array($result,MYSQL_ASSOC); mysql_free_result($result); foreach($FIELDS as $f) $HTTP_POST_VARS[$f] = _stripslashes( $question[$f]); /* Load the multiple choices if it's relevant to this question. */ if( esp_type_has_choices2( $HTTP_POST_VARS[type_id])) { $sql = "SELECT id,content FROM question_choice WHERE question_id='${id}' ORDER BY id"; $result = mysql_query($sql); while( $a = mysql_fetch_assoc($result)) { $a['content'] = _stripslashes( $a['content']); array_push( $multiple_choices, $a); } } } else { /* Here, we have $ignore_post_var == false, so we have to take care of what the user submitted. */ for( $i = 1; $i <= $HTTP_POST_VARS['num_choices']; $i++) array_push( $multiple_choices, array( 'id' => $HTTP_POST_VARS["choice_id_$i"], 'content' => $HTTP_POST_VARS["choice_content_$i"])); if( $request_for_extra_choice) array_push( $multiple_choices, array( "id" => '', "content" => '')); } /* Now, we'd like to know what's the "number" of the question from the user point of view. If the question is new, we'll set it to false. Since it is user point of view, $q_number will be 1-based. */ $q_number = false; if( $id != $NEW_QUESTION_ID) $q_number = array_search( $id, $q_ids) + 1; /* Now we set up an array with all the question types in it. 99 is the page break that can be added in the Order tab. */ $sql = 'SELECT id, type FROM question_type WHERE id != 99'; $result = mysql_query($sql); $arr = array(); while(list($key, $val) = mysql_fetch_row($result)) { $arr["$key"] = _($val); } ?> <script language="javascript"> <!-- // comment function clearTextInputs() { var i = 1; while (document.phpesp.elements["choice_content_" + i]) { document.phpesp.elements["choice_content_" + i].value = ""; i++; } } // comment --> </script> <input type="hidden" name="id" value="<?php echo($id); ?>"> <p> <?php //echo(_('Edit this field, or click the number of the field you would like to edit:')); ?> </p> <table> <tr> <td colspan="2"> <?php // If == 0 it means we're working on a question that is not // in the DB, therefore a "new question" if( $id == $NEW_QUESTION_ID ) echo _('You are currently editing a new question '); else echo _('You are currently editing question ') . "<b>$q_number</b>."; ?> </td> </tr> <tr> <td halign="left"> <?php if( count( $q_ids) > 0) { if( count( $q_ids) == 1) echo _("Question you can edit:"); else echo _("Questions you can edit:"); ?> </td> <td> <?php for( $i=1; $i<=count( $q_ids); ++$i) if( $i != $q_number) { ?> <input type="submit" name="q" value="<?php echo($i); ?>"> <?php } else echo(" ".$i." "); } ?> <input type="submit" name="q" value="<?php echo($NEW_QUESTION_BUTTON); ?>"> </td> </tr> </table> <hr> <table> <tr> <th><?php echo _('Type');?></th> <td><?php echo( mkselect('type_id',$arr, null, false)); ?></td> </tr> <tr> <th><?php echo _('Required');?></th> <td> <?php echo( mkselect( "required", array("Y" => _('Yes'),"N" => _('No')), null, false) ); ?></td> </tr> <tr> <th><?php echo _('Text');?></th> <td colspan="5" valign="top"><?php echo(mktextarea("content",4,60,"VIRTUAL")); ?></td> </tr> <?php // has answer options ... so show that part of the form if( $id == $NEW_QUESTION_ID || esp_type_has_choices2( $HTTP_POST_VARS[type_id])) { ?> <th> <?php echo _('Possible answers') ?> </th> <td> <input type="hidden" name="num_choices" value="<?php echo(count($multiple_choices)); ?>"> <?php for($i=0; $i<count( $multiple_choices); $i++) { ?> <input type="hidden" name="choice_id_<?php echo($i+1); ?>" value="<?php echo( $multiple_choices[$i]['id']); ?>"> <input type="text" size="60" name="choice_content_<?php echo($i+1); ?>" value="<?php echo( $multiple_choices[$i]['content']); ?>"> <br/> <?php } ?> <br/> <input type="submit" name="extra_choices" value="<?php echo(_('Add another answer line')); ?>"> <input type="button" name="clear" value="Clear all answer lines" onClick="clearTextInputs()"> </td> <?php } ?> </table> <hr/> |
From: Matthew G. <gr...@mu...> - 2003-09-24 18:04:42
|
I would prefer a PEAR solution, but something like this would be ok. On Wed, Sep 24, 2003 at 11:59:32AM -0600, Charlie Smith wrote: > So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword, $oracleSid); > you could have: > > function genDBConnect($genDBSid, $genDBUser, $genDBPassword) { > if (DB == 'Oracle) { > $connected = @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); > > if($error = OCIError()) { > die("<font color=red>ERROR!! Couldn't connect to server!</font>"); > } > return $connected; > } > else if (DB == 'MySQL' { > mysql_connect($genDBSid, $genDBUser, $genDBPassword) > } > } > > Something like this? along with other generic functions to handle each of the mysql/oracle functional pieces? > > > >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> > This does sound good. But instead of porting to Oracle, a port to > PEAR or some other "generic" database abstraction layer would be even > better. > > On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > > I'm starting a project to give us an oracle interface ie. replacing mySQL calls with Oracle. Sounds like this could be beneficial to others, especially you. Hope to be done by end of day today. Will let you know if sounds good to you. > > > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > > Dear all, > > > > > > I'm going to use phpESP for a project inside a big tyre company. However, I'll > > need to interface it with Oracle through ODBC. So, what do you think is > > better : > > > > - use normal ODBC (iODBC, unixODBC) > > - use PEAR libs > > > > Personally, I prefer ODBC because I read very poor benchmarks for PEAR > > database access. > > > > Any suggestions ? > > > > Stefan > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > phpESP-devel mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > > > > > This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. > > > > > > ============================================================================== > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > phpESP-devel mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > -- mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |
From: Kon <ang...@ip...> - 2003-09-25 08:38:57
|
Guys, I think that the generic functions would be OK as it provides greater choice. Regards Kon On Thu, 2003-09-25 at 04:04, Matthew Gregg wrote: > I would prefer a PEAR solution, but something like this would be ok. > > On Wed, Sep 24, 2003 at 11:59:32AM -0600, Charlie Smith wrote: > > So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword, $oracleSid); > > you could have: > > > > function genDBConnect($genDBSid, $genDBUser, $genDBPassword) { > > if (DB == 'Oracle) { > > $connected = @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); > > > > if($error = OCIError()) { > > die("<font color=red>ERROR!! Couldn't connect to server!</font>"); > > } > > return $connected; > > } > > else if (DB == 'MySQL' { > > mysql_connect($genDBSid, $genDBUser, $genDBPassword) > > } > > } > > > > Something like this? along with other generic functions to handle each of the mysql/oracle functional pieces? > > > > > > >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> > > This does sound good. But instead of porting to Oracle, a port to > > PEAR or some other "generic" database abstraction layer would be even > > better. > > > > On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > > > I'm starting a project to give us an oracle interface ie. replacing mySQL calls with Oracle. Sounds like this could be beneficial to others, especially you. Hope to be done by end of day today. Will let you know if sounds good to you. > > > > > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > > > Dear all, > > > > > > > > > I'm going to use phpESP for a project inside a big tyre company. However, I'll > > > need to interface it with Oracle through ODBC. So, what do you think is > > > better : > > > > > > - use normal ODBC (iODBC, unixODBC) > > > - use PEAR libs > > > > > > Personally, I prefer ODBC because I read very poor benchmarks for PEAR > > > database access. > > > > > > Any suggestions ? > > > > > > Stefan > > > > > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > phpESP-devel mailing list > > > php...@li... > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > > > > > > > > > This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. > > > > > > > > > ============================================================================== > > > > > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > phpESP-devel mailing list > > > php...@li... > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > > |
From: Matthew G. <gr...@mu...> - 2003-09-25 13:59:56
|
Why I favor Pear... PearDB currently supports: MySQL PostgreSQL InterBase Mini SQL Microsoft SQL Server Oracle 7/8/8i ODBC (Open Database Connectivity) SyBase Informix FrontBase A port to PearDB will give us connectivity to all of these DB's almost for free. And I'm sure more thought and development time has gone into these libraries that we would ever do in a generic solution. How does a "generic" solution give us more choice? On Thu, Sep 25, 2003 at 06:46:34PM +1000, Kon wrote: > Guys, > > I think that the generic functions would be OK as it provides greater > choice. > > Regards > > Kon > > > On Thu, 2003-09-25 at 04:04, Matthew Gregg wrote: > > I would prefer a PEAR solution, but something like this would be ok. > > > > On Wed, Sep 24, 2003 at 11:59:32AM -0600, Charlie Smith wrote: > > > So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword, $oracleSid); > > > you could have: > > > > > > function genDBConnect($genDBSid, $genDBUser, $genDBPassword) { > > > if (DB == 'Oracle) { > > > $connected = @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); > > > > > > if($error = OCIError()) { > > > die("<font color=red>ERROR!! Couldn't connect to server!</font>"); > > > } > > > return $connected; > > > } > > > else if (DB == 'MySQL' { > > > mysql_connect($genDBSid, $genDBUser, $genDBPassword) > > > } > > > } > > > > > > Something like this? along with other generic functions to handle each of the mysql/oracle functional pieces? > > > > > > > > > >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> > > > This does sound good. But instead of porting to Oracle, a port to > > > PEAR or some other "generic" database abstraction layer would be even > > > better. > > > > > > On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > > > > I'm starting a project to give us an oracle interface ie. replacing mySQL calls with Oracle. Sounds like this could be beneficial to others, especially you. Hope to be done by end of day today. Will let you know if sounds good to you. > > > > > > > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > > > > Dear all, > > > > > > > > > > > > I'm going to use phpESP for a project inside a big tyre company. However, I'll > > > > need to interface it with Oracle through ODBC. So, what do you think is > > > > better : > > > > > > > > - use normal ODBC (iODBC, unixODBC) > > > > - use PEAR libs > > > > > > > > Personally, I prefer ODBC because I read very poor benchmarks for PEAR > > > > database access. > > > > > > > > Any suggestions ? > > > > > > > > Stefan > > > > > > > > > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > > > Welcome to geek heaven. > > > > http://thinkgeek.com/sf > > > > _______________________________________________ > > > > phpESP-devel mailing list > > > > php...@li... > > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > > > > > > > > > > > > > This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. > > > > > > > > > > > > ============================================================================== > > > > > > > > > > > > > > > > This sf.net email is sponsored by:ThinkGeek > > > > Welcome to geek heaven. > > > > http://thinkgeek.com/sf > > > > _______________________________________________ > > > > phpESP-devel mailing list > > > > php...@li... > > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > > > > > -- mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |
From: Charlie S. <Sm...@ld...> - 2003-09-26 21:22:02
Attachments:
inet_phpesp_survey.sql
inet_phpesp_designer.sql
inet_phpesp_question.sql
inet_phpesp_question_choice.sql
inet_phpesp_question_type.sql
inet_phpesp_realm.sql
inet_phpesp_respondent.sql
inet_phpesp_response.sql
inet_phpesp_response_bool.sql
inet_phpesp_response_date.sql
inet_phpesp_response_multiple.sql
inet_phpesp_response_other.sql
inet_phpesp_response_rank.sql
inet_phpesp_response_single.sql
inet_phpesp_response_text.sql
inet_phpesp_access_esp.sql
|
Attached are scripts to use in creating Oracle tables Could someone look these over and see if they look ok. I had to change a = column name from public to public_esp and a table name from access to access_esp as 'public' and 'access' are = reserved words in Oracle. Hope to have code ported over soon. Previous email: I'm starting a project to give us an oracle interface ie. replacing mySQL = calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> Dear all, I'm going to use phpESP for a project inside a big tyre company. However, = I'll=20 need to interface it with Oracle through ODBC. So, what do you think is=20 better : - use normal ODBC (iODBC, unixODBC) - use PEAR libs Personally, I prefer ODBC because I read very poor benchmarks for PEAR=20 database access. Any suggestions ? Stefan ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf=20 _______________________________________________ phpESP-devel mailing list php...@li...=20 https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf=20 _______________________________________________ phpESP-devel mailing list php...@li...=20 https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Stefan C. <sch...@ea...> - 2003-09-29 18:12:13
|
> Attached are scripts to use in creating Oracle tables Cool ! As soon as I start my Pear port, the information you provide here will be very helpful ! stF |
From: Stefan C. <sch...@ea...> - 2003-10-01 05:38:07
|
It looks difficult to add translation capabilities to phpESP. I've evaluated several scenarios but I'm quite disappointed overall. My best try is to mark a survey as a "model" and make copies of, marked as= =20 "localisations". Copies are independant (thus there's a risk of discrepanci= es=20 with the model). =46rom the acl point of view, we have :=20 =2D Model belongs to one group, one designer. =2D Models are viewable for a given set of groups (those wich are going to= =20 translate) =2D A translation is a copy of a model, owned by the translator and kept in= side=20 the group of the translator. =2D The memeber of the group of the model have access to the copies (and on= ly=20 the copies), even if they are outside the group. I don't like this scenario because it breaks the idea that groups are priva= te=20 (you are only allowed to see the surveys that are in you group). A nice=20 solution would be to allow that a person can belong to several groups. But= =20 this require a lot of code refactoring. I'd like to have your ideas here, because if I'm going to make big changes,= it=20 is likely that my Pear port will be useless to the community. A bad thing. stF |
From: Matthew G. <gr...@mu...> - 2003-10-01 13:28:52
|
Yup, translations are going to be a pain. Do the PEAR port first, basing it on the CVS phpESP code, before making any other changes to phpESP. That way it can be used by the community. On Tue, Sep 30, 2003 at 10:23:04AM +0000, Stefan Champailler wrote: > It looks difficult to add translation capabilities to phpESP. > I've evaluated several scenarios but I'm quite disappointed overall. > > My best try is to mark a survey as a "model" and make copies of, marked as > "localisations". Copies are independant (thus there's a risk of discrepancies > with the model). > > From the acl point of view, we have : > > - Model belongs to one group, one designer. > - Models are viewable for a given set of groups (those wich are going to > translate) > - A translation is a copy of a model, owned by the translator and kept inside > the group of the translator. > - The memeber of the group of the model have access to the copies (and only > the copies), even if they are outside the group. > > I don't like this scenario because it breaks the idea that groups are private > (you are only allowed to see the surveys that are in you group). A nice > solution would be to allow that a person can belong to several groups. But > this require a lot of code refactoring. > > I'd like to have your ideas here, because if I'm going to make big changes,it > is likely that my Pear port will be useless to the community. A bad thing. > > stF > > > > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > -- mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |
From: Stefan C. <sch...@ea...> - 2003-10-01 18:55:46
|
Every here and there, there is a possibility to pick a survey (fro reporting, testing, etc.) I think that the list provided gives too much information. A "dumb" enduser doesn't care about a survey ID. Similarly, I don't see the point to give the group/owner name, if someone has no right to see someone else's work, that is, he'll just see his stuff. So, I propose to simplify and abstract the "pick a survey" screens. I'll retain the original layout if the user is a "superuser". In that case, it is normal to provide as much information as possible. stF |
From: Matthew G. <gr...@mu...> - 2003-10-01 19:06:49
|
If you can, try and work out each change you propose in as small of a chunk as possible. Small incremental patches are much more likely to be accepted into the main tree, if that is your goal. For example: - A patch that converts to PEAR - A patch that converts HTML to CSS etc... On Wed, Oct 01, 2003 at 05:14:26PM +0000, Stefan Champailler wrote: > Every here and there, there is a possibility to pick a survey (fro reporting, > testing, etc.) > > I think that the list provided gives too much information. A "dumb" enduser > doesn't care about a survey ID. Similarly, I don't see the point to give the > group/owner name, if someone has no right to see someone else's work, that > is, he'll just see his stuff. > > So, I propose to simplify and abstract the "pick a survey" screens. I'll > retain the original layout if the user is a "superuser". In that case, it is > normal to provide as much information as possible. > > stF > > > > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > -- mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |
From: James E. F. <jf...@uv...> - 2003-10-02 00:49:31
|
Stefan Champailler wrote: > Every here and there, there is a possibility to pick a survey (fro reporting, > testing, etc.) > > I think that the list provided gives too much information. A "dumb" enduser > doesn't care about a survey ID. Similarly, I don't see the point to give the > group/owner name, if someone has no right to see someone else's work, that > is, he'll just see his stuff. > > So, I propose to simplify and abstract the "pick a survey" screens. I'll > retain the original layout if the user is a "superuser". In that case, it is > normal to provide as much information as possible. (I think) Survey ID's were initially there because survey names were not. Clearly id's should be used internally and behind the scenes as much as possible for efficiency, but they should be hidden from all users completely. The superuser group should (optionally?) see Ids. Similarly, places like the cross-tabulation should avoid using internal question IDs etc., tho logical question number are fine (I think this is already free of exposed IDs?). -James |
From: Stefan C. <sch...@ea...> - 2003-10-01 18:55:46
|
I've noticed that sometimes one says : - a "realm" when he means a "group" - a "field" for a "question" - a "form" for a "survey" I'll fix them as I get them. If you agree, let's be consistent : - respondent : someone who answers a survey - designer : someone who makes a survey - survey : a survey - question : a question, part of a survey - group : a set of people or a set of survey stF |
From: James E. F. <jf...@uv...> - 2003-10-02 00:17:40
|
Stefan Champailler wrote: > I've noticed that sometimes one says : > > - a "realm" when he means a "group" > - a "field" for a "question" > - a "form" for a "survey" > > I'll fix them as I get them. If you agree, let's be consistent : > > - respondent : someone who answers a survey > - designer : someone who makes a survey > - survey : a survey > - question : a question, part of a survey > - group : a set of people or a set of survey > > stF The existence of the term ``realm'' is purely due to a namespace conflict. ``group'' is a SQL keyword, as in ``... GROUP BY ...'' The terms ``field'' and ``form'' originated from the thought that phpesp could be modified to be a generic data-entry system. Doing away with field/form is probably a good thing. Be careful using ``group'' as it will certainly collide in the SQL namespace. -James |
From: Stefan C. <sch...@ea...> - 2003-10-01 18:55:46
|
If I have time, I think it'd be nice to move all the HTML style coding to CSS. It'd be so much easier to ensure a coherent look all over the place. stF |
From: Charlie S. <sm...@ld...> - 2003-09-28 21:01:00
|
In attempting a conversion to Oracle, I've noticed that some fields are = defined with NOT NULL default '' =20 Oracle won't accept a "NOT NULL" and a default value. Also the empty string '' doesn't appear to be acceptable either. The = enum type would be translated to a check constraint and added after the = table definition, as a lot of the fields appear to be defined in mysql with a enum and default value. = Oracle doesn't like a check constraint and a default value in the actual = table definition either, but works to have the check constraint defined by = itself as follows. =20 I wonder if I shouldn't leave the NOT NULL off of these field definitions = where there is also a default values. Also, it may easier to convert the = code to use oracle if there were a space in place of the empty string? Any= = opinions? =20 Ex. This would be the table definition for the designer table: drop table designer; create table designer ( username varchar2(64) default ' ', password varchar2(16) default ' ', auth varchar2(16) default 'BASIC', realm varchar2(16) default ' ', =66name varchar2(16) default NULL, lname varchar2(24) default NULL, email varchar2(64) default NULL, pdesign varchar2(7) default 'Y', pstatus varchar2(7) default 'N', pdata varchar2(7) default 'N', pall varchar2(7) default 'N', pgroup varchar2(7) default 'N', puser varchar2(7) default 'N', disabled varchar2(7) default 'N', changed varchar2(14), expiration varchar2(14) ) tablespace users storage (initial 2M next 2M); =20 -- alter table designer drop constraint designer_pdesign_ck; alter table designer add constraint designer_pdesign_ck check (pdesign in ('Y','N')); =20 -- alter table designer drop constraint designer_pstatus_ck; alter table designer add constraint designer_pstatus_ck check (pstatus in ('Y','N')); =20 -- alter table designer drop constraint designer_pdata_ck; alter table designer add constraint designer_pdata_ck check (pdata in ('Y','N')); =20 -- alter table designer drop constraint designer_pall_ck; alter table designer add constraint designer_pall_ck check (pall in ('Y','N')); =20 -- alter table designer drop constraint designer_pgroup_ck; alter table designer add constraint designer_pgroup_ck check (pgroup in ('Y','N')); =20 -- alter table designer drop constraint designer_puser_ck; alter table designer add constraint designer_puser_ck check (puser in ('Y','N')); =20 -- alter table designer drop constraint designer_disabled_ck; alter table designer add constraint designer_disabled_ck check (disabled in ('Y','N')); =20 -- alter table designer drop Primary key cascade; alter table designer add constraint designer_username_real_pk primary key (username,realm) using index; >>> Kon <ang...@ip...> 09/25/03 02:46AM >>> Guys, I think that the generic functions would be OK as it provides greater choice. Regards Kon On Thu, 2003-09-25 at 04:04, Matthew Gregg wrote: > I would prefer a PEAR solution, but something like this would be ok. >=20 > On Wed, Sep 24, 2003 at 11:59:32AM -0600, Charlie Smith wrote: > > So instead of mysql_connect or @OCIPLogon($oracleUser, $oraclePassword,= = $oracleSid); > > you could have: > >=20 > > function genDBConnect($genDBSid, $genDBUser, $genDBPassword) { > > if (DB =3D=3D 'Oracle) { > > $connected =3D @OCIPLogon($genDBUser, $genDBPassword, $genDBSid); > >=20 > > if($error =3D OCIError()) { > > die("<font color=3Dred>ERROR!! Couldn't connect to = server!</font>"); > > } > > return $connected; > > } > > else if (DB =3D=3D 'MySQL' { > > mysql_connect($genDBSid, $genDBUser, $genDBPassword) > > } > > } > >=20 > > Something like this? along with other generic functions to handle each= = of the mysql/oracle functional pieces? > >=20 > >=20 > > >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> > > This does sound good. But instead of porting to Oracle, a port to > > PEAR or some other "generic" database abstraction layer would be even > > better. > >=20 > > On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > > > I'm starting a project to give us an oracle interface ie. replacing = mySQL calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. > > >=20 > > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM = >>> > > > Dear all, > > >=20 > > >=20 > > > I'm going to use phpESP for a project inside a big tyre company. = However, I'll=20 > > > need to interface it with Oracle through ODBC. So, what do you think = is=20 > > > better : > > >=20 > > > - use normal ODBC (iODBC, unixODBC) > > > - use PEAR libs > > >=20 > > > Personally, I prefer ODBC because I read very poor benchmarks for PEA= R= =20 > > > database access. > > >=20 > > > Any suggestions ? > > >=20 > > > Stefan > > >=20 > > >=20 > > >=20 > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf=20 > > > _______________________________________________ > > > phpESP-devel mailing list > > > php...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 > > >=20 > > >=20 > > >=20 > > > This message may contain confidential information, and is intended = only for the use of the individual(s) to whom it is addressed. > > >=20 > > >=20 > > > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > >=20 > > >=20 > > >=20 > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf=20 > > > _______________________________________________ > > > phpESP-devel mailing list > > > php...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 > > >=20 > >=20 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf=20 _______________________________________________ phpESP-devel mailing list php...@li...=20 https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Charlie S. <Sm...@ld...> - 2003-09-30 14:17:54
|
I just noticed the PEAR supported databases are listed as follows at = pear.php.net. See = http://pear.php.net/manual/en/package.database.mdb.intro-dsn.php mysql -> MySQL pgsql -> PostgreSQL ibase -> InterBase mssql -> Microsoft SQL Server oci8 -> Oracle 7/8/8i =66bsql -> FrontBase Stephan indicates that he prefers ODBC over PEAR because of poor benchmarks= ,= but it looks like he's going to do a pear port anyway: He stated: "... Here's what I'll do=20 : as soon as I got a dev environment with Oracle/ODBC running, I'll test th= e= =20 Pear connectivity. If it works, I'll move my phpEsp to PEAR. But,=20 unfortunatley, I have also several additional features that I have to add t= o= =20 the code that are not necessarily good for everyone ..." However, I'll need to interface with OCI8 right away. Would it be = beneficial for me to get started on a PEAR port? I need to get phpESP = going with OCI8 anyway - and right now. Where are the benchmarks and what kind of time frame are we looking at to = get the PEAR stuff done with Stephan doing it? >>> "Matthew Gregg" <gr...@mu...> 09/25/03 07:59AM >>> Why I favor Pear... PearDB currently supports: MySQL PostgreSQL InterBase Mini SQL Microsoft SQL Server Oracle 7/8/8i ODBC (Open Database Connectivity) SyBase Informix =46rontBase A port to PearDB will give us connectivity to all of these DB's almost =66or free. And I'm sure more thought and development time has gone into these libraries that we would ever do in a generic solution. How does a "generic" solution give us more choice? On Thu, Sep 25, 2003 at 06:46:34PM +1000, Kon wrote: > Guys, >=20 > I think that the generic functions would be OK as it provides greater > choice. >=20 > Regards >=20 > Kon >=20 >=20 > On Thu, 2003-09-25 at 04:04, Matthew Gregg wrote: > > I would prefer a PEAR solution, but something like this would be ok. > >=20 > > On Wed, Sep 24, 2003 at 11:59:32AM -0600, Charlie Smith wrote: > > > So instead of mysql_connect or @OCIPLogon($oracleUser, = $oraclePassword, $oracleSid); > > > you could have: > > >=20 > > > function genDBConnect($genDBSid, $genDBUser, $genDBPassword) { > > > if (DB =3D=3D 'Oracle) { > > > $connected =3D @OCIPLogon($genDBUser, $genDBPassword, = $genDBSid); > > >=20 > > > if($error =3D OCIError()) { > > > die("<font color=3Dred>ERROR!! Couldn't connect to = server!</font>"); > > > } > > > return $connected; > > > } > > > else if (DB =3D=3D 'MySQL' { > > > mysql_connect($genDBSid, $genDBUser, $genDBPassword) > > > } > > > } > > >=20 > > > Something like this? along with other generic functions to handle = each of the mysql/oracle functional pieces? > > >=20 > > >=20 > > > >>> "Matthew Gregg" <gr...@mu...> 09/24/03 10:56AM >>> > > > This does sound good. But instead of porting to Oracle, a port to > > > PEAR or some other "generic" database abstraction layer would be even > > > better. > > >=20 > > > On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > > > > I'm starting a project to give us an oracle interface ie. replacing= = mySQL calls with Oracle. Sounds like this could be beneficial to others, = especially you. Hope to be done by end of day today. Will let you know = if sounds good to you. > > > >=20 > > > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM= = >>> > > > > Dear all, > > > >=20 > > > >=20 > > > > I'm going to use phpESP for a project inside a big tyre company. = However, I'll=20 > > > > need to interface it with Oracle through ODBC. So, what do you thin= k= is=20 > > > > better : > > > >=20 > > > > - use normal ODBC (iODBC, unixODBC) > > > > - use PEAR libs > > > >=20 > > > > Personally, I prefer ODBC because I read very poor benchmarks for = PEAR=20 > > > > database access. > > > >=20 > > > > Any suggestions ? > > > >=20 > > > > Stefan > > > >=20 > > > >=20 > > > >=20 > > > > This sf.net email is sponsored by:ThinkGeek > > > > Welcome to geek heaven. > > > > http://thinkgeek.com/sf=20 > > > > _______________________________________________ > > > > phpESP-devel mailing list > > > > php...@li...=20 > > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 > > > >=20 > > > >=20 > > > >=20 > > > > This message may contain confidential information, and is intended = only for the use of the individual(s) to whom it is addressed. > > > >=20 > > > >=20 > > > > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > > >=20 > > > >=20 > > > >=20 > > > > This sf.net email is sponsored by:ThinkGeek > > > > Welcome to geek heaven. > > > > http://thinkgeek.com/sf=20 > > > > _______________________________________________ > > > > phpESP-devel mailing list > > > > php...@li...=20 > > > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 > > > >=20 > > >=20 >=20 --=20 mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf=20 _______________________________________________ phpESP-devel mailing list php...@li...=20 https://lists.sourceforge.net/lists/listinfo/phpesp-devel=20 ---------------------------------------------------------------------------= --- This message may contain confidential information, and is intended only for= = the use of the individual(s) to whom it is addressed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
From: Matthew G. <gr...@mu...> - 2003-09-24 16:56:45
|
This does sound good. But instead of porting to Oracle, a port to PEAR or some other "generic" database abstraction layer would be even better. On Wed, Sep 24, 2003 at 09:38:28AM -0600, Charlie Smith wrote: > I'm starting a project to give us an oracle interface ie. replacing mySQL calls with Oracle. Sounds like this could be beneficial to others, especially you. Hope to be done by end of day today. Will let you know if sounds good to you. > > >>> "Stefan Champailler" <sch...@ea...> 09/22/03 08:09AM >>> > Dear all, > > > I'm going to use phpESP for a project inside a big tyre company. However, I'll > need to interface it with Oracle through ODBC. So, what do you think is > better : > > - use normal ODBC (iODBC, unixODBC) > - use PEAR libs > > Personally, I prefer ODBC because I read very poor benchmarks for PEAR > database access. > > Any suggestions ? > > Stefan > > > > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > > > > This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. > > > ============================================================================== > > > > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > -- mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |