Search found 6 matches
- Mon Sep 15, 2008 1:28 pm
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
Re: PHP Array search
WoW WoW WoW! I Think I got it to work... $X = QueryIntoArray("SELECT `Tag` FROM ToDo WHERE `Location` = '". $Location ."' AND Needed = 1 ORDER BY CAST(`Tag` AS UNSIGNED) ASC"); $Y = QueryIntoArray("SELECT `Tag` FROM Done WHERE `Location` = '".$Location."' ORDER B...
- Mon Sep 15, 2008 5:04 am
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
Re: PHP Array search
Ok, So I Have a query (2 actually); One which pulls all the Locations and Tags from `Todo` ($X), one which pulls the Asset, Tag and Location from the `done` table ($Y). I'd like to check if ALL the Tags per location in $Y show up in $X. After that, I wish to check if there are values in $X Which don...
- Sun Sep 14, 2008 4:44 pm
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
Re: PHP Array search
Hey, thanks for the function, It looks like it works (at least.. I don't get [s]much[/s] Any errors :')) Anyway, I'm not as good in the Array functions as I am with Strings (read: I Suck at arrays). I now have two foreach loops; foreach($Y as $key => $value){ foreach($value as $key2 =>...
- Sun Sep 14, 2008 4:21 am
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
Re: PHP Array search
Sure, sorry for my tad-late reply, but I've got to sleep once in a while ;) Here's the tablestructure: `Todo`: LocID - Integer Location - VarChar Tag - VarChar Desktop - VarChar Docking - Bool ActualUserID - VarChar Floor - VarChar Chamber - VarChar (ps. there are more fields, but I don't use those)...
- Sat Sep 13, 2008 8:03 pm
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
Re: PHP Array search
Indeed, it would be much easier to create a new column based on the `done` list, and set that column to 0's and 1's if (not)done.. There's just one problem: The two databases are a 'snapshot' of 4 months working in Excel, and here comes the worst part: it's done by hand, meaning that it's full of er...
- Sat Sep 13, 2008 6:49 pm
- Forum: PHP - Code
- Topic: PHP Array search
- Replies: 12
- Views: 1016
PHP Array search
Hi there, First of all, i'd like to excuse if this question has already been answered, but I don't know keywords to search for it.. (it's a though question in my head, maybe it isn't though at all.. i don't know..) Anyway, this is my problem: I have 2 tables, let's call them `ToDo` and `Done`. Bot t...