You can subscribe to this list here.
2001 |
Jan
|
Feb
(1) |
Mar
(265) |
Apr
(166) |
May
(25) |
Jun
(17) |
Jul
(20) |
Aug
(47) |
Sep
(6) |
Oct
(14) |
Nov
(66) |
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(109) |
Feb
(64) |
Mar
(34) |
Apr
(23) |
May
(64) |
Jun
(9) |
Jul
(13) |
Aug
(6) |
Sep
(33) |
Oct
(272) |
Nov
(67) |
Dec
(75) |
2003 |
Jan
(264) |
Feb
(244) |
Mar
(171) |
Apr
(119) |
May
(54) |
Jun
(93) |
Jul
(51) |
Aug
(48) |
Sep
(14) |
Oct
(49) |
Nov
(47) |
Dec
(15) |
2004 |
Jan
(13) |
Feb
(27) |
Mar
(18) |
Apr
(44) |
May
(35) |
Jun
(24) |
Jul
(39) |
Aug
(142) |
Sep
(35) |
Oct
(34) |
Nov
(49) |
Dec
(24) |
2005 |
Jan
(60) |
Feb
(71) |
Mar
(19) |
Apr
(27) |
May
(68) |
Jun
(4) |
Jul
(30) |
Aug
(10) |
Sep
(23) |
Oct
(24) |
Nov
(13) |
Dec
(6) |
2006 |
Jan
(4) |
Feb
(46) |
Mar
(64) |
Apr
(18) |
May
(16) |
Jun
(37) |
Jul
(7) |
Aug
(19) |
Sep
(9) |
Oct
(8) |
Nov
(3) |
Dec
(23) |
2007 |
Jan
(25) |
Feb
(21) |
Mar
(32) |
Apr
(36) |
May
(12) |
Jun
(1) |
Jul
(7) |
Aug
(15) |
Sep
(13) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
(3) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(7) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2009 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Steven L. <st...@tu...> - 2002-10-21 13:57:37
|
I have just been building this text within my modules. Most of the time I just put an _TEXT at the end of the template tag to designate text. Then I just put these directly in the template. I am not sure if we need another file to take care of this. If someone wants it to say something else, they can either go make a translation or just remove the template tag from the template and add their text to the template. Just my 2 cents. Open for suggestions. > Suggested procedure question. > > Say you are making a template for something. Inside the template you may > want to include some text. The problem is that you also want that text > translated. How should it be handled? > > o The module itself has a text area for you to add data to a template, > it is stored in the database, translated, then sent to the template tag. > > o INCLUDE a php file that allows extra template tags with your module. > This file allows the admin to add extra data. > For example: > <?php > // The admin knows the template array is named 'myTemp' > > $myTemp["text1"] = $_SESSION["translate"]->it("Welcome to my website"); > $myTemp["text2"] = $_SESSION["translate"]->it("Blah Blah"); > > ?> > > Then in the template file > {TEXT1} > {REG_TAG} > {TEXT2} > > > o Create a tag for the template function that translates text. > > Should we plan for this? > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Steven Levin Electronic Student Services Appalachian State University Phone: 828.262.2431 PhpWebsite Development Team URL: http://phpwebsite.appstate.edu Email: st...@NO... |
From: Don S. <do...@se...> - 2002-10-21 13:56:43
|
Assuming your sqlInsert function uses nextId(), it looks fine. I have reservations about your naming of parameters as "maxColumn" and "returnMax". Perhaps naming them "idColumn" and "returnId" would be better. I realize it's just names and doesn't really matter but might as well mention it before it's written. Don. On Mon, 21 Oct 2002, Matthew McNaney wrote: > Ok I figured out what I did wrong. I did not set my test table as primary, > it were merely indexed. I thought all my id columns were primary. > Anyway... > > I got it to work. Thanks Don. I actually found your letters to php.net > through Google. Man that thing is fast :) > > As you said (and Bob's -1 explained) it appear to increment correctly. I > am naming the sequence by the table name as will be unique per table. > > I have written the sqlInsert in my copy but I need a definative parameter > list. Please vote on the final outcome. > > function sqlInsert ($db_array, $table_name, $maxColumn=NULL, > $check_dup=FALSE, $returnMax=FALSE, $show_sql=FALSE) > > db_array : associate array of columns=>values > > table_name : self explanatory > > maxColumn : the id column to increment > > check_dup : does not insert a row if a duplicate db_array is found (will > ignore the id for checking purposes) > > returnMax : returns the max id if TRUE. > > show_sql : shows the sql string for error checking. > > --------------------------------- > User example: > $this->user_id = $GLOBALS["core"]->sqlInsert($sql_array, "mod_users", > "user_id", 1); > > > I would like to get this voted on as I am anxious to update my code. > > Please post :) > > Thanks again, > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Matthew M. <ma...@tu...> - 2002-10-21 13:55:47
|
Here is the CVS link: http://res1.stddev.appstate.edu/horde/chora/co.php/phpws_core/core/Database.php?r=1.25&Horde=cd378aebc4cbdedfdfd10c2df9052480 Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 |
From: Matthew M. <ma...@tu...> - 2002-10-21 13:50:28
|
Ok I figured out what I did wrong. I did not set my test table as primary, it were merely indexed. I thought all my id columns were primary. Anyway... I got it to work. Thanks Don. I actually found your letters to php.net through Google. Man that thing is fast :) As you said (and Bob's -1 explained) it appear to increment correctly. I am naming the sequence by the table name as will be unique per table. I have written the sqlInsert in my copy but I need a definative parameter list. Please vote on the final outcome. function sqlInsert ($db_array, $table_name, $maxColumn=NULL, $check_dup=FALSE, $returnMax=FALSE, $show_sql=FALSE) db_array : associate array of columns=>values table_name : self explanatory maxColumn : the id column to increment check_dup : does not insert a row if a duplicate db_array is found (will ignore the id for checking purposes) returnMax : returns the max id if TRUE. show_sql : shows the sql string for error checking. --------------------------------- User example: $this->user_id = $GLOBALS["core"]->sqlInsert($sql_array, "mod_users", "user_id", 1); I would like to get this voted on as I am anxious to update my code. Please post :) Thanks again, Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Don S. <do...@se...> - 2002-10-21 13:29:44
|
Here is my example test.php. I created a mysql db 'test' with user/pass of 'test'. Each time I reload the page the id is incremented one. If I change the sequence name it starts over, and then when I change it back it picks up where it left off, as expected. Basically you just need to have a standard naming for your sequences, since the names are really only mentioned in php as you don't create the sequences until they are first needed. Don. <? require_once "DB.php"; ?> <html><body> <? $user = "test"; $pass = "test"; $host = "localhost"; $db_name = "test"; $db_type = "mysql"; $dsn = "$db_type://$user:$pass@$host/$db_name"; echo "dsn = $dsn<br />"; $db = DB::connect($dsn, true); if (DB::isError($db)) { die ("error: " . $db->getMessage()); } else { echo "Connected successfully.<br />"; } $id = $db->nextId("testSeq"); echo "id = $id<br />"; $db->disconnect(); ?> </body></html> On Mon, 21 Oct 2002, Matthew McNaney wrote: > > I still don't understand why you aren't just getting the new ID value > > via the $db->nextId() function via PEAR sequences. > > I couldn't get it to work. I will try again today and implement it if > successful. > > Post an example if you get a chance. > > Thanks, > Matt > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Matthew M. <ma...@tu...> - 2002-10-21 13:23:54
|
> I still don't understand why you aren't just getting the new ID value > via the $db->nextId() function via PEAR sequences. I couldn't get it to work. I will try again today and implement it if successful. Post an example if you get a chance. Thanks, Matt Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Don S. <do...@se...> - 2002-10-21 13:17:12
|
I still don't understand why you aren't just getting the new ID value via the $db->nextId() function via PEAR sequences. I've tested this on my box and it worked great. I made sure to test it after stopping and starting mysql and apache and the sequence held true throughout. Using nextId would eliminate the need for table locking and any possibility of the evils of ID re-use. Don. On Sat, 19 Oct 2002, Matthew McNaney wrote: > > The way I'm reading this. You plan to derive your user id by selecting > > the current max id and incrementing it one? If this is the case, > > wouldn't you have a problem if multiple users happend to submit new > > user requests simultaneously? > > Not a problem. In fact I'm sure the PEAR solution requires the same process: > you just lock the table. > > $core->sqlLock("myTable"); > $core->sqlInsert($sql_array, "myTable", 1, "id_column", 1); > $core->sqlUnlock(); > > Sorry, forgot mention it. > > Matt > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Matthew M. <ma...@tu...> - 2002-10-21 12:13:37
|
Suggested procedure question. Say you are making a template for something. Inside the template you may want to include some text. The problem is that you also want that text translated. How should it be handled? o The module itself has a text area for you to add data to a template, it is stored in the database, translated, then sent to the template tag. o INCLUDE a php file that allows extra template tags with your module. This file allows the admin to add extra data. For example: <?php // The admin knows the template array is named 'myTemp' $myTemp["text1"] = $_SESSION["translate"]->it("Welcome to my website"); $myTemp["text2"] = $_SESSION["translate"]->it("Blah Blah"); ?> Then in the template file {TEXT1} {REG_TAG} {TEXT2} o Create a tag for the template function that translates text. Should we plan for this? Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Matthew M. <ma...@tu...> - 2002-10-20 21:00:12
|
> Sorry I took so long to join in this thread. Weekend and all :) > > We currently have the pear database package in place. I think it would > be good for us in the long run if we rewrite a bit of code and implement > more of it's features. In the process this will fix the database > abstraction problem. This could also mean a change in how modules > create their tables (easy dump edit), but we can retain most of the > current API which should minimize editing module code. > > Thoughts? > No problems rewriting but only if it simplifies the current structure. The PEAR database package appears to be tool that stack on top of the DB class, which is the same thing we are doing, just in a different format. Looking at the PEAR package, it appears to ramp up difficulty to access the database. You have to create a new database class for each table, extend it to the PEAR package, define the table. Once you do all this, it does perform some neat tricks in that you can call rows with just the id, then edit the object itself. This could clean up code as it would separate the database data from the execution. For example, if you run the aforementioned sequence through testObject you will see that it is simply pulling the highest id number and incrementing it by one right before it inserts the row. This is exactly what sqlInsert does now. It appears to use the sequence functionality we would need to implement the entire database package. I'm not sure yet. I will need to test it personally before I give a thumbs up on rewriting the Database class so close to release. Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Adam M. <ad...@tu...> - 2002-10-20 16:46:31
|
We may want to look at the DB_DataObject package too. It looks pretty nice. http://pear.php.net/manual/en/packages.database.db-dataobject.php Adam > Sorry I took so long to join in this thread. Weekend and all :) > > We currently have the pear database package in place. I think it would > be good for us in the long run if we rewrite a bit of code and implement > more of it's features. In the process this will fix the database > abstraction problem. This could also mean a change in how modules > create their tables (easy dump edit), but we can retain most of the > current API which should minimize editing module code. > > Thoughts? > > Adam > > --------------------------------- > Adam Morton > Developer - Web Technology Group > Appalachian State University > http://phpwebsite.appstate.edu > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |
From: Adam M. <ad...@tu...> - 2002-10-20 16:40:57
|
Sorry I took so long to join in this thread. Weekend and all :) We currently have the pear database package in place. I think it would be good for us in the long run if we rewrite a bit of code and implement more of it's features. In the process this will fix the database abstraction problem. This could also mean a change in how modules create their tables (easy dump edit), but we can retain most of the current API which should minimize editing module code. Thoughts? Adam --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |
From: Bob T <bo...@el...> - 2002-10-20 03:04:32
|
-1 on this I think a sequence number, when used as an ID, should be called only once, and then thrown away even if it is not used. It may not be a huge coding problem, but it could lead to a huge error, if someones private data was exposed to someone else. Why take the risk? If you have grabbed a number and then released it, why return it? It costs nothing. There are lots of numbers. What about if the number 6 is returned and the high number is already 15? Will the sequence function find 6 and use it again? It would be lots of overhead to find the blank spots, and for what reason? Re: "For example, if we add 1, 2, and 3 and then 3 is deleted, auto_increment will add 4. Our new functionality will add 3 instead (it doesn't keep track of that stuff). Possible problem? Only if a module developer did not remove all linked material. In other words, a module could have 3 as a linked id because it did not know it was deleted. So it would pull 3's data. Not a huge problem, but one we would have to be wary of while programming. |
From: Matthew M. <ma...@tu...> - 2002-10-19 20:21:38
|
> The way I'm reading this. You plan to derive your user id by selecting > the current max id and incrementing it one? If this is the case, > wouldn't you have a problem if multiple users happend to submit new > user requests simultaneously? Not a problem. In fact I'm sure the PEAR solution requires the same process: you just lock the table. $core->sqlLock("myTable"); $core->sqlInsert($sql_array, "myTable", 1, "id_column", 1); $core->sqlUnlock(); Sorry, forgot mention it. Matt |
From: Don S. <do...@se...> - 2002-10-19 17:33:55
|
The way I'm reading this. You plan to derive your user id by selecting the current max id and incrementing it one? If this is the case, wouldn't you have a problem if multiple users happend to submit new user requests simultaneously? Yes I know the chances are slim but it's a very real problem. Also the fact that IDs would be re-used is a problem I think. I think a true database sequence object is needed. I'll try and play around with what was told to me from the pear mailing list. Don. On Sat, 19 Oct 2002, Matthew McNaney wrote: > Funny you should mention this Don :) > > I was driving home from getting lunch and I was thinking about your letter > from yesterday. I thought, "Well we already have a parameter that will > return the max value of a column if you request it. Why not just write > that amount to the column?" > > So I was ready to work on it and I read your followup. Well, I looked > sequences up on the PEAR site but I couldn't find HOW to define a sequence > before you call nextId. > > So after trying unsuccessfully for make that work, I decided to use my > plan, which I believe is how they are doing it anyway :) > > Anyway, here is how it works: > > function sqlInsert ($db_array, $table_name, $check_dup=FALSE, > $maxColumn=NULL, $autoIncrement=FALSE, $show_sql=FALSE) > > I have tested this on creating a user and it worked: > $user_id = $GLOBALS["core"]->sqlInsert($sql_array, "mod_users", 1, > "user_id", 1); > > The $sql_array has the variable to put in the database. mod_users is the > table name. The next parameter (1) instructs the function not to insert a > repeat. The "user_id" is the name of the column I want to return the max > amount of. Finally the last parameter is a boolean saying to write the max > amount to the $maxColumn ("user_id"). > > So, once everyone reviews this procedure and if it gets voted up, then we > can start converting our sqlInserts. > > Consider this however. MySQL auto_increment remembers the last number added. > > For example, if we add 1, 2, and 3 and then 3 is deleted, auto_increment > will add 4. Our new functionality will add 3 instead (it doesn't keep > track of that stuff). Possible problem? Only if a module developer did not > remove all linked material. In other words, a module could have 3 as a > linked id because it did not know it was deleted. So it would pull 3's > data. Not a huge problem, but one we would have to be wary of while > programming. > > Thanks for lighting the fire under me Don :) > > Sincerely, > Matt > > > It looks like the PEARy way of doing things is to use PEAR Sequences: > > http://pear.php.net/manual/en/core.db.tut_sequences.php > > > > I got this info from the PEAR mailing list when I asked about them: > > > > "When you first use a sequence PEAR::DB creates it in the DB, so you > > don't *have* to create it beforehand, you can though, in which case it > > has to be of the form 'sequencename_seq' without the quotes and if you > > left the default values. You can change the format of the string used to > > create the sequence to match your own preferences. > > > > If you create it you must not set it to autoincrement but better to INT > > unsigned." > > > > Has PEAR sequences been looked at before? > > > > Just curious, > > Don. > > > > On Fri, 18 Oct 2002, Don Seiler wrote: > > > >> In the install.sql for core and some modules (gallery I've seen), you > >> have create table statements that use "auto_increment" to define a > >> field as sequential. > >> > >> Isn't auto_increment a mysql function and not standard across > >> databases? I don't see it in postgres and I'm pretty sure it won't > >> fly in Oracle. > >> > >> I want to use PEAR for database abstraction but using mysql-specific > >> syntax kind of defeats the purpose. > >> > >> Am I mistaken? > >> > >> Don. > >> > >> > >> > >> ------------------------------------------------------- > >> This sf.net email is sponsored by:ThinkGeek > >> Welcome to geek heaven. > >> http://thinkgeek.com/sf > >> _______________________________________________ > >> Phpwebsite-developers mailing list > >> Php...@li... > >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > >> > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Don S. <do...@se...> - 2002-10-19 17:12:03
|
According to what was told to me, the first time you call nextId, it will create the sequence if it isn't created. This didn't work for you? Don. On Sat, 19 Oct 2002, Matthew McNaney wrote: > Funny you should mention this Don :) > > I was driving home from getting lunch and I was thinking about your letter > from yesterday. I thought, "Well we already have a parameter that will > return the max value of a column if you request it. Why not just write > that amount to the column?" > > So I was ready to work on it and I read your followup. Well, I looked > sequences up on the PEAR site but I couldn't find HOW to define a sequence > before you call nextId. > > So after trying unsuccessfully for make that work, I decided to use my > plan, which I believe is how they are doing it anyway :) > > Anyway, here is how it works: > > function sqlInsert ($db_array, $table_name, $check_dup=FALSE, > $maxColumn=NULL, $autoIncrement=FALSE, $show_sql=FALSE) > > I have tested this on creating a user and it worked: > $user_id = $GLOBALS["core"]->sqlInsert($sql_array, "mod_users", 1, > "user_id", 1); > > The $sql_array has the variable to put in the database. mod_users is the > table name. The next parameter (1) instructs the function not to insert a > repeat. The "user_id" is the name of the column I want to return the max > amount of. Finally the last parameter is a boolean saying to write the max > amount to the $maxColumn ("user_id"). > > So, once everyone reviews this procedure and if it gets voted up, then we > can start converting our sqlInserts. > > Consider this however. MySQL auto_increment remembers the last number added. > > For example, if we add 1, 2, and 3 and then 3 is deleted, auto_increment > will add 4. Our new functionality will add 3 instead (it doesn't keep > track of that stuff). Possible problem? Only if a module developer did not > remove all linked material. In other words, a module could have 3 as a > linked id because it did not know it was deleted. So it would pull 3's > data. Not a huge problem, but one we would have to be wary of while > programming. > > Thanks for lighting the fire under me Don :) > > Sincerely, > Matt > > > It looks like the PEARy way of doing things is to use PEAR Sequences: > > http://pear.php.net/manual/en/core.db.tut_sequences.php > > > > I got this info from the PEAR mailing list when I asked about them: > > > > "When you first use a sequence PEAR::DB creates it in the DB, so you > > don't *have* to create it beforehand, you can though, in which case it > > has to be of the form 'sequencename_seq' without the quotes and if you > > left the default values. You can change the format of the string used to > > create the sequence to match your own preferences. > > > > If you create it you must not set it to autoincrement but better to INT > > unsigned." > > > > Has PEAR sequences been looked at before? > > > > Just curious, > > Don. > > > > On Fri, 18 Oct 2002, Don Seiler wrote: > > > >> In the install.sql for core and some modules (gallery I've seen), you > >> have create table statements that use "auto_increment" to define a > >> field as sequential. > >> > >> Isn't auto_increment a mysql function and not standard across > >> databases? I don't see it in postgres and I'm pretty sure it won't > >> fly in Oracle. > >> > >> I want to use PEAR for database abstraction but using mysql-specific > >> syntax kind of defeats the purpose. > >> > >> Am I mistaken? > >> > >> Don. > >> > >> > >> > >> ------------------------------------------------------- > >> This sf.net email is sponsored by:ThinkGeek > >> Welcome to geek heaven. > >> http://thinkgeek.com/sf > >> _______________________________________________ > >> Phpwebsite-developers mailing list > >> Php...@li... > >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > >> > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Matthew M. <ma...@tu...> - 2002-10-19 16:57:44
|
Funny you should mention this Don :) I was driving home from getting lunch and I was thinking about your letter from yesterday. I thought, "Well we already have a parameter that will return the max value of a column if you request it. Why not just write that amount to the column?" So I was ready to work on it and I read your followup. Well, I looked sequences up on the PEAR site but I couldn't find HOW to define a sequence before you call nextId. So after trying unsuccessfully for make that work, I decided to use my plan, which I believe is how they are doing it anyway :) Anyway, here is how it works: function sqlInsert ($db_array, $table_name, $check_dup=FALSE, $maxColumn=NULL, $autoIncrement=FALSE, $show_sql=FALSE) I have tested this on creating a user and it worked: $user_id = $GLOBALS["core"]->sqlInsert($sql_array, "mod_users", 1, "user_id", 1); The $sql_array has the variable to put in the database. mod_users is the table name. The next parameter (1) instructs the function not to insert a repeat. The "user_id" is the name of the column I want to return the max amount of. Finally the last parameter is a boolean saying to write the max amount to the $maxColumn ("user_id"). So, once everyone reviews this procedure and if it gets voted up, then we can start converting our sqlInserts. Consider this however. MySQL auto_increment remembers the last number added. For example, if we add 1, 2, and 3 and then 3 is deleted, auto_increment will add 4. Our new functionality will add 3 instead (it doesn't keep track of that stuff). Possible problem? Only if a module developer did not remove all linked material. In other words, a module could have 3 as a linked id because it did not know it was deleted. So it would pull 3's data. Not a huge problem, but one we would have to be wary of while programming. Thanks for lighting the fire under me Don :) Sincerely, Matt > It looks like the PEARy way of doing things is to use PEAR Sequences: > http://pear.php.net/manual/en/core.db.tut_sequences.php > > I got this info from the PEAR mailing list when I asked about them: > > "When you first use a sequence PEAR::DB creates it in the DB, so you > don't *have* to create it beforehand, you can though, in which case it > has to be of the form 'sequencename_seq' without the quotes and if you > left the default values. You can change the format of the string used to > create the sequence to match your own preferences. > > If you create it you must not set it to autoincrement but better to INT > unsigned." > > Has PEAR sequences been looked at before? > > Just curious, > Don. > > On Fri, 18 Oct 2002, Don Seiler wrote: > >> In the install.sql for core and some modules (gallery I've seen), you >> have create table statements that use "auto_increment" to define a >> field as sequential. >> >> Isn't auto_increment a mysql function and not standard across >> databases? I don't see it in postgres and I'm pretty sure it won't >> fly in Oracle. >> >> I want to use PEAR for database abstraction but using mysql-specific >> syntax kind of defeats the purpose. >> >> Am I mistaken? >> >> Don. >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers >> > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Don S. <do...@se...> - 2002-10-18 20:41:39
|
It looks like the PEARy way of doing things is to use PEAR Sequences: http://pear.php.net/manual/en/core.db.tut_sequences.php I got this info from the PEAR mailing list when I asked about them: "When you first use a sequence PEAR::DB creates it in the DB, so you don't *have* to create it beforehand, you can though, in which case it has to be of the form 'sequencename_seq' without the quotes and if you left the default values. You can change the format of the string used to create the sequence to match your own preferences. If you create it you must not set it to autoincrement but better to INT unsigned." Has PEAR sequences been looked at before? Just curious, Don. On Fri, 18 Oct 2002, Don Seiler wrote: > In the install.sql for core and some modules (gallery I've seen), you have > create table statements that use "auto_increment" to define a field as > sequential. > > Isn't auto_increment a mysql function and not standard across databases? > I don't see it in postgres and I'm pretty sure it won't fly in Oracle. > > I want to use PEAR for database abstraction but using mysql-specific > syntax kind of defeats the purpose. > > Am I mistaken? > > Don. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |
From: Matthew M. <ma...@tu...> - 2002-10-18 20:24:12
|
We are aware of it. We have some ideas to overcome it that we hope to implement by the final release. Matt > In the install.sql for core and some modules (gallery I've seen), you > have create table statements that use "auto_increment" to define a > field as sequential. > > Isn't auto_increment a mysql function and not standard across databases? > I don't see it in postgres and I'm pretty sure it won't fly in Oracle. > > I want to use PEAR for database abstraction but using mysql-specific > syntax kind of defeats the purpose. > > Am I mistaken? > > Don. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Matthew M. <ma...@tu...> - 2002-10-18 20:16:38
|
Users has been committed with the module settings I was discussing this morning. You will notice when you reinstall that many of the options for users (fullname, url, etc.) have been removed. It was old, sloppy code that needed to be put to pasture. It will eventually be replaced by something else. For now, users just keeps track of your essential information. Have a good weekend. Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Don S. <do...@se...> - 2002-10-18 19:21:23
|
Not sure if it's worth anyone's while, but I've attached a script that I used to get the latest CVS and put it into my phpws doc root. hopefully you can get the jist of it and what you'd need to customize for your own setup. In my case my doc root is /usr/local/phpws/phpws_core. Don. |
From: Don S. <do...@se...> - 2002-10-18 17:40:04
|
In the install.sql for core and some modules (gallery I've seen), you have create table statements that use "auto_increment" to define a field as sequential. Isn't auto_increment a mysql function and not standard across databases? I don't see it in postgres and I'm pretty sure it won't fly in Oracle. I want to use PEAR for database abstraction but using mysql-specific syntax kind of defeats the purpose. Am I mistaken? Don. |
From: Randall W. <rh...@ma...> - 2002-10-18 15:26:07
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think that perhaps a slightly different system might be useful. I envision this: When a module is installed, it would include in the database a URL that points to a link that would point to an update service/server for that module. When the site admin checks for updates, PHPWS would follow this link which would return only the currently available "stable" or "release" version of the module in question. That could be checked internally against the version stored in the modules table. If the version differs, then the admin would be able to select that package to be updated. This way ASU need not provide the update service for all PHPWS package developers, but need only provide the packages that developers require to provide their own update services. > The ASU development team has been talking about a new service/feature of > phpWebSite. We have been interested in an update system for some time > and > would like to expand on the concept. We also try to take every user > suggestion seriously and if possible work their suggestion into our > long-term plan. An update system will not only help with its intended > service but will offer us to opportunity to provide another service > people > have requested. This service is a master list of sorts. We would like > to > provide a central list of all packages associated with phpWebSite. This > list will be needed for an update system any way so it is only natural > to > combine the two. Here is what we were thinking of as a first version. > > Any developer will have the ability to register their package on the > main > list. This package will not be stored on our site but we will have > update > links, version and compatibility info for packages. Boost will also be > compatible with this system so users should see if they need updates > when > they check inside phpWebSite. All the developer needs to do is show up > and update the info on one site to notify every one. Not innately, but > in > future versions I would like to see an update/security email > notification > part of the system. > > One a user note we will now have a central list that should link to any > package. This list will be a mirrored list for maximum redundancy. > This > will also provide a new section on any mirror site for new/updated > packages for the day, week, month, etc. > > What does everyone think? > > Thanks > Jeremy - -- Randall Wood rh...@ma... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (Darwin) iD8DBQE9sCgF/vw8n6FGbYcRApWrAJ9hVJoGVVbBcUo4W2H75jErBPC43gCgzNn+ dDsQU3cVG8V8IX6/8I08jM0= =byuk -----END PGP SIGNATURE----- |
From: Adam M. <ad...@tu...> - 2002-10-18 14:56:30
|
JaveScript: > In any case, can anyone foresee a problem with this? +1 from me > I am going to add new functionality to the user module. +1 again :) Adam --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |
From: Matthew M. <ma...@tu...> - 2002-10-18 13:18:48
|
Yo, The javascript detection is about to change. Here is how it works. The first time the user comes to the site, phpWebSite attempts a javascript redirect. If it is successful, they are noted as having js and a cookie is written. Now from that point on, anytime they come to the site, javascript goes by the cookie. THEN if they login another check is made. If javascript is ON then the cookie is set to on as is the user. If it is off, then the cookie is set as OFF as is the user. What is nice is that: o First time users are seen as having javascript or not. o When you log out, you don't lose your javascript status. You may be asking "Why not just have PHP detect it?" I thought the same thing. There is a function called get_browser(0 but it depends on a browscap.ini file. This file has to be downloaded, installed, etc. Also, apparently only one place supplies the file (http://www.cyscape.com/browscap/) and you have to fill out a form to get it. Plus they have a no-redistribute clause in their file. So what is the bad side? Well I wanted opinion on the initial redirect. Again, they should only be redirected if they do not have a cookie for the site and their user session is NULL. In any case, can anyone foresee a problem with this? ------------------------------------------------------------------ Second subject: I am going to add new functionality to the user module. Currently, the only way to store specialty information on a user is via the cookie. This is all good for normal mundane settings, but it can be restrictive. If you want to store something about a user for your module, you would have to keep it local because the mod_user table is not expandable. What I am going to implement is a module settings table for the users. The user table will store ONLY the basic information (username, password, email). Everything else will be handled by this setting table. To utilize it you will just call a function with the name of your module and the variable you want to pull. It will work much like the cookie_write and cookie_read functions but more robust. This should add more functionality AND allow other php programs to be converted into modules easier. Instead of worrying about each converted program storing a different user base, there will be just the one and the settings can be as varied as the module. Ok thats all :) Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 |
From: Steven L. <st...@tu...> - 2002-10-17 15:25:44
|
+1 good function +1 to naming it moduleLink instead of indexLink > > I like the function, it looks useful, but can we change the name to > something like moduleLink()? indexLink() makes me think it's going to > create a link that sends me to the home page. > > moduleLink() ? +1 : -1 > > hehehe > > Adam > >> i have submitted a new function in Text.php. >> >> function indexLink($title, $module=NULL, $getVars=NULL){ >> * Allows a quick link function for phpWebSite modules to the >> index.php. * >> * A replacement for the clunky function link. This is for modules >> accessing * local information ONLY. It adds the hub web address and >> index.php automatically. >> * You supply the name of the module and the variables. >> >> Basically, I am sick of the link function when 99% of the time I hit >> it, I need a link that is module specific. >> >> please take a look and respond if it is cool to stay. >> >> Thanks >> Matt >> >> Matthew McNaney >> Internet Systems Architect >> Electronic Student Services >> Email: ma...@tu... >> URL: http://phpwebsite.appstate.edu >> Phone: 828-262-6493 >> ICQ: 141057403 >> >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by: viaVerio will pay you up to >> $1,000 for every account that you consolidate with us. >> http://ad.doubleclick.net/clk;4749864;7604308;v? >> http://www.viaverio.com/consolidator/osdn.cfm >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > --------------------------------- > Adam Morton > Developer - Web Technology Group > Appalachian State University > http://phpwebsite.appstate.edu > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Steven Levin Electronic Student Services Appalachian State University Phone: 828.262.2431 PhpWebsite Development Team URL: http://phpwebsite.appstate.edu Email: st...@NO... |