 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
|
 |
|
 |
01-16-2009, 07:44 PM
|
#41 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
Quote:
Originally Posted by Salathe
|
It will be distributed open source (under the MIT license), it will however function like Flickr.
|
|
|
|
01-16-2009, 09:15 PM
|
#42 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Thank you Salathe.
It has now been uploaded!
__________________
|
|
|
|
01-16-2009, 09:19 PM
|
#43 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
To follow naming convention (I never made this clear), please name it class.mysql.php
Great work, I will start assigning other tasks now.
|
|
|
|
01-16-2009, 09:25 PM
|
#44 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Can't I name it class.DBmysql.php ? Since the class itself isn't named mysql, it sounds a little confusing to use different names on the file and the class. I can understand if you want to use a prefix of class. infront of the classname, so everyone can see it's a class, but to rename it?
Ahwell, tell me what to do. Rename to class.mysql.php or class.DBmysql.php
__________________
|
|
|
|
01-16-2009, 09:29 PM
|
#45 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
That does make sense, name it that class.DBmysql.php .
|
|
|
|
01-16-2009, 09:41 PM
|
#46 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Done !
__________________
|
|
|
|
01-16-2009, 10:34 PM
|
#47 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,324
Thanks: 5
|
I'd like to make continual little comments on the submitted code. Where do you guys think this would be best placed? Code Review is enabled for the project at Google so people can review lines (or files, blocks of code, etc.) even on a per-revision basis which would make things more tied together. Or, would those coding prefer comments to be made in threads like this one?
|
|
|
|
01-17-2009, 01:01 AM
|
#48 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
Use the Code Review feature. I look forward to seeing your feedback on the code.
|
|
|
|
01-17-2009, 01:42 AM
|
#49 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
I just noticed that your userclass uses mysql_result. I haven't used it in my class, actually, I've never used it. But I could implement it in the getQueryResult.
My idea would basicly means that you would do like this:
PHP Code:
$dbobj->exeQuery($sql);
$this->username = $dbobj->getQueryResult(0, "username"); $this->password = $dbobj->getQueryResult(0, "user_pass"); $this->rank = $dbobj->getQueryResult(0, "rank");
Want me to implement it?
__________________
|
|
|
|
01-17-2009, 02:00 AM
|
#50 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
That would be good.
|
|
|
|
01-17-2009, 03:45 PM
|
#51 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
|
Could I suggest using a DAL for the database? E.g. an abstract database class, that is extended by the MySQL class.
|
|
|
|
01-17-2009, 05:23 PM
|
#52 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Already suggested it myself, but VI didn't want it for now.
Quote:
Originally Posted by Tanax
Okey, after reading about their functions, I see why you thought it would sound silly or impractical. Indeed, it would be very impractical to have mysqli option in the mysql DB object. However, I've done a DB factory class, which would let you create a db object based off of what db you want, like:
$db = DB::getDatabase('mysql');
and it would then create a new DBmysql and return the instance.
It would then be easy to create other objects, such as DBmysqli, DBmysql_PDO, DBsqlite_PDO, etc.
But that's only if you guys want it. However, I think Orc will have to change the __construct in his class since it's checking if the class is an instance of DBmysql, and I don't know if someone else has done something using this class that would be affected by this change.
I would however be happy to change it, if you want.
And by "change it", I mean create the factory class.
|
__________________
|
|
|
|
01-17-2009, 05:48 PM
|
#53 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
How do I update an already existing file in the svn?
When I try to add it, it says it already exists..
__________________
|
|
|
|
01-17-2009, 07:28 PM
|
#54 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,324
Thanks: 5
|
You make the changes locally, then "commit" those changes to the central repository. Are you using the command line or some application to use SVN?
|
|
|
|
01-17-2009, 07:40 PM
|
#55 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
Quote:
Originally Posted by Ross
Could I suggest using a DAL for the database? E.g. an abstract database class, that is extended by the MySQL class.
|
While I do not think that it is a bad idea, I don't want to get that complex with the SQL class right now. Reason being that all development is waiting for it, to add something else to it would delay development even more than it already has been,
|
|
|
|
01-17-2009, 08:17 PM
|
#56 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Yes, I've done the change locally.
How do I commit the changes?
I'm using tortoise svn
__________________
|
|
|
|
01-17-2009, 08:32 PM
|
#57 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,296
Thanks: 17
|
Quote:
Originally Posted by Tanax
Yes, I've done the change locally.
How do I commit the changes?
I'm using tortoise svn
|
You right click on the file and hit "SVN Commit"
|
|
|
|
01-17-2009, 08:52 PM
|
#58 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Ah, it was a little more to it than that. I had to create a repository first, then download all the files, then modify the file, and THEN commit. But I've updated it now so it works with the getQueryResult(2, 'field')
__________________
|
|
|
|
01-17-2009, 08:57 PM
|
#59 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
|
Quote:
Originally Posted by Tanax
Ah, it was a little more too it than that. I had to create a repository first, then download all the files, then modify the file, and THEN commit. But I've updated it now so it works with the getQueryResult(2, 'field')
|
Remember to do an SVN Update before you Commit to check that noone else has edited the file since you started :)
|
|
|
|
01-17-2009, 09:03 PM
|
#60 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,324
Thanks: 5
|
Tanax: I don't know if you noticed but I made a whole bunch of comments on your previous version, revision 55.
It's ok there's nothing too huge to worry about, I guess the main is that magic quotes line in the secure method. Also, there's the overall comment (which I'll quote to save you clicking) which could do with some attention.
Quote:
Why are there so many places where one can provide a SQL query as an argument? I count 5.
There also appears to be a confusing selection of ways to achieve a usually simple task: grab an assoc. array of results. More clear documentation of the use of this class is requested (perhaps on the forums).
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|