PHP - Adressbook - How To Add More Fileds To This One
Hi dear freaks
i want to create an adressbook with MySQL. At the moment i do not know how many fields i need. i want to be flexible with that - at least in the next days... Untill i am sure how many fields i really would need. i have found a Dump that allready is build for a Adressbook - i found this one in the internet. http://www.apachefriends.org/f/viewtopic.php?f=14&t=26305&start=0&sid=633a3f317b08dc6d8e555a81ed10538f&view=print # phpMyAdmin SQL Dump # version 2.5.7-pl1 # http://www.phpmyadmin.net # # Host: localhost # Erstellungszeit: 04. September 2007 um 16:37 # Server Version: 4.0.20 # PHP-Version: 4.3.7 # # Datenbank: `joels` # # -------------------------------------------------------- # # Tabellenstruktur f�r Tabelle `address_book` # CREATE TABLE `address_book` ( `address_book_id` int(11) NOT NULL auto_increment, `customers_id` int(11) NOT NULL default '0', `entry_gender` char(1) NOT NULL default '', `entry_company` varchar(32) default NULL, `entry_firstname` varchar(32) NOT NULL default '', `entry_lastname` varchar(32) NOT NULL default '', `entry_street_address` varchar(64) NOT NULL default '', `entry_suburb` varchar(32) default NULL, `entry_postcode` varchar(10) NOT NULL default '', `entry_city` varchar(32) NOT NULL default '', `entry_state` varchar(32) default NULL, `entry_country_id` int(11) NOT NULL default '0', `entry_zone_id` int(11) NOT NULL default '0', PRIMARY KEY (`address_book_id`), KEY `idx_address_book_customers_id` (`customers_id`) ) TYPE=MyISAM AUTO_INCREMENT=2 ; can i use this - and can i easily add more fields... ? lookforward to hear from you Regards db1 Similar TutorialsHowdy - good evening dear PHP-Friends, i am new to programming. I have a couple of (hundred) adress( and data ) lines that look like the following: {'url': 'http://Url.org/~dilbert/', 'cname': 'dibert_1', 'name': 'Dilbert_1', 'email': 'dilbert_1@ncf.ca'} {'url': 'http://Url.org/~dilbertwo/', 'cname': 'dilbert_2', 'name': 'Dilbert_2', 'email': 'dilbert_2@hotmail.com'} {'url': 'http://Url.org/~dilberthree/', 'cname': 'dilbert_3', 'name': ' Dilbert_3', 'email': 'dilbert_3@gmail.com'} and so forth.... Well - i want to put the data into the Thnderbird-Adressbook: But the adressbook does not take the data in this format. So what can i do with the data-set. How to Manipulate!? Note: At least a name and a E-Mail-Adress is needed. Nothing more - but - a Mail - Adress is pretty important. i look forward to hear from you if you have any further questions - jus t lemme know! how would i retrieve a hidden field from this form Code: [Select] $checkoutBtn .= '<form action="checkout.php" method="POST" id="checkform"> <input type="hidden" name="item_name_' . $x . '" value="' . $eventname . '"> <input type="hidden" name="amount_' . $x . '" value="' . $studentsprice . '"> <input type="hidden" name="quantity_' . $x . '" value="' . $each_item['quantity'] . '">;[ <input type="hidden" name="custom" value="' . $product_id_array . '"> <input type="submit" class="checkoutbtn" name="checkoutbtn" value="CHECKOUT" /> </form>'; /code] Ok so standard query can be written as: SELECT * FROM my_table WHERE specific_field = 'some_term' Is there some query that I can search for 'some_term' in all the fields at once in my_table without defining them in the query? SELECT * FROM my_table WHERE any_field = 'some_term' This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=317025.0 |