MyUPB.com Discussion forums
You are not logged in. Please Register or Login.

Announcements

This project is not completely dead. I've just started work on localisation.
Please email me at clark@NOSPAMmyupb.com once you've registered so I can activate your account (remove "NOSPAM" from the email address)
~~~~ Clark


If you're getting a "Deprecated" error message, follow the instructions here

URGENT Security Patch for ≤ v2.2.6
A security hole has been discovered, follow the instructions and download the patch at the topic page.
Did the patch break your search page? Search Patch

Download myUPB
Version 2.2.7 Released - 24th December 2010


Pages (2):1
Posted: Jan 21, 2007 12:10:06 am
Clark



Hi,

I am developing a script at the moment that uses mySQL but was wondering about creating a TextDB version.

Having looked through your manual I found it looked relatively easy but couldn't find anything on something equivalent to the LEFT JOIN or LIMIT functions of mySQL.

Do you have an equivalent in TextDB, it would be ultra-useful if you did cause then I only need to program my script once rather than go through coding a complicated file based system as an alternative for those without mySQL access.

Hope you do

Clark
myUPB Developer

Posted: Jan 21, 2007 7:11:14 pm
Rebles



Could you explain the functionality of "LEFT", "JOIN", and "LIMIT"?  Then we can better answer your question.  Sorry, Tim and I REALLY like TextDB over SQL (noteeth)
--Jerroyd Moore
Bachelors of Science, Computer Science 2011
Jack Baskin School of Engineering
University of California, Santa Cruz

Posted: Jan 21, 2007 7:57:49 pm
codex



LIMIT: Return results within the database but LIMIT to x results, an example would be in the forum, LIMIT to 30 threads.

LEFT JOIN will merge a database, an example would be users database and whos online database, the left represents the first table. so in TDB's version it would need to be something like: $tdb->join($fp, "LEFT", "table1", "table2");

and array_merge them. but thats just my thoughts.
IMLeeds www.imleeds.com Company search engine. Search with IMLeeds.

Posted: Jan 21, 2007 10:56:53 pm
Clark



I working on a photo gallery script.

The categories are in one table with the category details and a unique ID for each one.

The gallery details are in a separate table with the relevant category ID for each one and I use LEFT JOIN to merge the category details with the gallery details when viewing a gallery if the category IDs in both tables match.

It means that instead of having to update every single row of the gallery table if the category details change I only have to perform one query.

It helps speed things up........database normalisation I believe it's called.

And LIMIT functions like the php array_slice function.......it would just make it easier to do it all in one go although it would be possible just to use the array slice function on the result array.
myUPB Developer

Posted: Jan 22, 2007 1:46:14 am
Pilot



we have no JOIN functionality but we do have LIMIT functionality on all our return functions (listRec, query), if you open up the textdb class file you will see the function prototypes with there aruments. your looking for $start and $howmany, I think those are self explainitory.
Tim Hoeppner

UPB Programmer
B. Sc. in Electrical Engineering

Posted: Jan 22, 2007 4:57:10 am
Rebles



Also, I don't know if you've discovered our wiki documentation, but it's at www.myupb.com/wiki/index.php/TextDB_Manual.

Again what Tim said, there isn't any JOIN functionality, however the LIMIT functionality is achieved through the $start and $howmany arguements in tdb::listRec(), and tdb::query() (See Documentation for the appropiate argument #.  The $start argument specifies howmany records you wish to skip before starting to return.  For tdb::listRec(), it would simply skip that many records, however, for tdb::query(), it will skip that many records that match the query string, making this functionality very useful for paging.  As far the $howmany, it simply returns that many records after $start.  Similarly to $start, tdb::listRec(), will simply return that many records after $start, whereas tdb::query() will return that many records after $start that match the query string.

Anyways, I hope that wasn't too wordy and I hope that deepens your understanding of TextDB.
--Jerroyd Moore
Bachelors of Science, Computer Science 2011
Jack Baskin School of Engineering
University of California, Santa Cruz

Posted: Jan 22, 2007 10:59:30 pm
Clark



All LEFT JOIN does is take the information from two tables and merges them into one.

I suppose I could do a query on the gallery and use the catid from that result and do a second query on that.

Might prove a bit tricky converting a couple of the functions but it should do.

I'll let you know how I get on and will post here if I become totally unstuck.

I did read the Wiki Manual before I posted but it was at the end of a long day....probably should only read manuals when it's still the same day you woke up on :D

Thanks for the info.

As your the TextDB gurus, would you be willing to test it once it's complete???
myUPB Developer

Posted: Jan 22, 2007 11:38:30 pm
Rebles



yeah sure, we can test it for you.
--Jerroyd Moore
Bachelors of Science, Computer Science 2011
Jack Baskin School of Engineering
University of California, Santa Cruz

Posted: Jan 23, 2007 1:53:55 am
Pilot



I will consider adding a JOIN type function, I know alot of people use this in there SQL queries and it would be nice to do everything a SQL database can.
Tim Hoeppner

UPB Programmer
B. Sc. in Electrical Engineering

Posted: Jan 24, 2007 6:50:11 pm
Clark



Have just begun the conversion process.........

So far so good

Surrounded with pieces of paper from the excel file with all the function definitions and examples :D
myUPB Developer

Pages (2):1
Powered by myUPB v2.2.6  ·   © PHP Outburst 2002 - 2013

Creative Commons License