Wrox Programmer Forums
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2007, 05:39 AM
Registered User
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Search Script

I was hoping to create a search script where a user can search for a mobile phone on my website. The user is able to put the manufacturer name or the phone name e.g. Nokia or 6230. Please could any1 help.

The following is the tables i have;
Code:
CREATE TABLE `my_phones` (
  `manufacturer` varchar(20) NOT NULL default '',
  `phone_id` int(4) unsigned NOT NULL auto_increment,
  `manufacturer_id` int(3) unsigned NOT NULL default '0',
  `phone_name` varchar(60) NOT NULL default '',
  `price` decimal(6,2) NOT NULL default '0.00',
  `weight` varchar(60) default NULL,
  `dimensions` varchar(255) default NULL,
  `image_name` varchar(30) default NULL,
  `network` varchar(50) NOT NULL default '',
  `introduced` varchar(20) NOT NULL default '',
  `STATUS` varchar(15) NOT NULL default '',
  `TYPE` varchar(50) NOT NULL default '',
  `size` varchar(40) NOT NULL default '',
  `ringtones` varchar(75) NOT NULL default '',
  `vibration` varchar(20) NOT NULL default '',
  `data` varchar(75) NOT NULL default '',
  `phonebook` varchar(40) NOT NULL default '',
  `call_records` varchar(50) NOT NULL default '',
  `messaging` varchar(75) NOT NULL default '',
  `Bluetooth` varchar(10) NOT NULL default '',
  `CAMERA` varchar(100) NOT NULL default '',
  `USB` varchar(30) NOT NULL default '',
  `other` varchar(100) NOT NULL default '',
  `other2` varchar(35) NOT NULL default '',
  `other3` varchar(35) NOT NULL default '',
  `other4` varchar(35) NOT NULL default '',
  `other5` varchar(35) NOT NULL default '',
  `infrared_port` varchar(30) NOT NULL default '',
  `games` varchar(100) NOT NULL default '',
  `colors` varchar(75) NOT NULL default '',
  PRIMARY KEY  (`phone_id`),


The results should display;

phone_name, image_name (image itself, along with a link to the actual phone) and the price.

Any help would be appreciated.

 
Old January 30th, 2007, 05:01 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

select phone_name, image_name from my_phones where phone_name like 'Nokia'

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search script ultimateace Access VBA 1 January 3rd, 2007 03:45 PM
VBA Script to search fields and display contents Jwill1014 Access VBA 8 June 2nd, 2005 07:33 AM
Google Adsense for Search script in asp.net page claudew BOOK: ASP.NET Website Programming Problem-Design-Solution 6 September 20th, 2004 08:59 PM
How to script search form in PHP/MYSQL javabeans PHP How-To 0 January 12th, 2004 03:53 AM
Call and run CGI script from a PHP script ... how? dbruins BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 10th, 2003 03:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.