| | |
Searching within arrays problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 2
Reputation:
Solved Threads: 0
Hi People,
First of all I would like to appologize if this has been posted before but I have not been able to find the answer.
The Problem
Basically what I'm trying to do is create a page that lists all assets from an assets table and disables the check box for the ones that have been patched (which the records are held in a comma seperated column called asset_tags in the patching table). This is where it gets complicated I have two assoc arrays and I want to search the assets tables with values from the patching table and the assets that have been patched should have a checkbox disabled and the ones that haven't been patched to show that check box enabled.
Any help or point in the right direction would be greatly appreciated, my humble a kindest regards.
mus
First of all I would like to appologize if this has been posted before but I have not been able to find the answer.
The Problem
Basically what I'm trying to do is create a page that lists all assets from an assets table and disables the check box for the ones that have been patched (which the records are held in a comma seperated column called asset_tags in the patching table). This is where it gets complicated I have two assoc arrays and I want to search the assets tables with values from the patching table and the assets that have been patched should have a checkbox disabled and the ones that haven't been patched to show that check box enabled.
Any help or point in the right direction would be greatly appreciated, my humble a kindest regards.
mus
Are you using database? If so, in the output, arrange the data (both asset name and situation - patched or not) into a single array. For example: [php]$data = $row['asset_name']." - ".$row['situation']."\n";[/php]When displaying the reseult, use explode fuction to separate the asset_name to the situation. I hope this help.
Last edited by zippee; Sep 26th, 2006 at 6:09 pm.
Ecommerce-Web-Store.com Building Your e-Business.
•
•
Join Date: Sep 2006
Posts: 2
Reputation:
Solved Threads: 0
Hi Zippee,
Thanks for your reply I am using a database and have managed to find a way round this as you have described, once again thank you very much dude.
•
•
•
•
Are you using database? If so, in the output, arrange the data (both asset name and situation - patched or not) into a single array. For example: [php]$data = $row['asset_name']." - ".$row['situation']."\n";[/php]When displaying the reseult, use explode fuction to separate the asset_name to the situation. I hope this help.
Thanks for your reply I am using a database and have managed to find a way round this as you have described, once again thank you very much dude.
![]() |
Similar Threads
- non blocking getchar.. big problem :( (C)
- arrays and functions (C++)
- Arrays problem (C++)
- build table used 2d arrays (C)
- Windows Wont Load Past Login (Windows NT / 2000 / XP)
- Operating Systems assignment (C++)
Other Threads in the PHP Forum
- Previous Thread: How to install mysqli extension
- Next Thread: create password storage/retrieval program?
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





