![]() |
![]() |
This project is not completely dead. I've just started work on localisation. 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
|
![]() UPB Team Member
Posts: 893
Registered: 2006-11-14 |
TextDB has a similar function called tdb::cleanUp(), try that.
--Jerroyd Moore
Bachelors of Science, Computer Science 2011 Jack Baskin School of Engineering University of California, Santa Cruz |
![]()
Posts: 18
Registered: 2007-02-06 |
Quote:Because I don't know how to use cached query results (if it's possible). In my script, colors used in another script are listed. Some colors are used several times so my query (which is located in FOR loop) repeates. I expected the same results but I got nothing instead... As I wrote previously, $tdb->cleanUp() doesn't help. |
![]() UPB Team Member
Posts: 837
Registered: 2006-11-22 |
I can confirm this.
I just tested it out in my script. Using $link->cleanUp() unsets the file pointers as I expect it's supposed to do, but resetting the file pointer to the same name immediately after cleanUp and then running the query again still yields a NULL result Even using a different name in the setFP after the cleanUp() yields a NULL result myUPB Developer |
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
Quote: lets say you store your query in $query, why don't you just run a for loop twice with the same data instead of querying twice??? Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
|
Last edited by: Pilot on Feb 19, 2007 11:35:11 pm
| |
![]()
Posts: 18
Registered: 2007-02-06 |
Quote:Well... I can't do that because I can't predict what colors will be used. Lets say I've got a table with the following data I print the records in FOR loop and also there I run query(). I just can't run that loop twice... I cannot even imagine how to cope with the results in that case! But as you can see, I've got one color which appears twice. Records are displayed in the order they are stored in database so it's impossible to run FOR loop twice instead of querying twice
I hope you undastand... I think I will prepare english version of my script interface and put it online so you can see it working Code will be available to view. |
![]()
Posts: 18
Registered: 2007-02-06 |
All right
I've made it!
Here is table of colors: www.legoshop.yoyo.pl/en/colors.php Here is table of bricks: www.legoshop.yoyo.pl/en/bricks.php If you want to look at the code, here's a ZIP archive of all files used in this example: www.legoshop.yoyo.pl/en/all.zip As I can see, it's working fine although the server is a bit slow... what can I expect from free hosting ![]() |
![]() UPB Team Member
Posts: 893
Registered: 2006-11-14 |
I dunno what it is, but it looks awesome! How were you able to get around the NULL query return
--Jerroyd Moore
Bachelors of Science, Computer Science 2011 Jack Baskin School of Engineering University of California, Santa Cruz |
![]() UPB Moderator
Posts: 311
Registered: 2006-11-15 |
the function empty? - Always a good function to use
.IMLeeds www.imleeds.com Company search engine. Search with IMLeeds. |
![]()
Posts: 18
Registered: 2007-02-06 |
Quote:Well... the source code is available to download here: http://www.legoshop.yoyo.pl/en/all.zip As I previously wrote, in my FOR loop I just run setFp at the beginning and run cleanUp at the end. That's the only working method of querying twice with the same results. Feel free to look at my code and tell me what am I doing wrong ![]() |