Jump to content

pikemsu28

Members
  • Posts

    164
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

pikemsu28's Achievements

Member

Member (2/5)

0

Reputation

  1. in your table structure, you have `birthday_visited` char(1) NOT NULL, and you are trying to load 'Not Visited' and 'Visited'......looks like your table structure may not be correct. also, your primary key is `birthday_reg_date` so it can not be duplicated, you have two records with the same date. you may need to add an 'ID' column. try this: CREATE TABLE `birthdays` ( `ID` int(11) NOT NULL, `birthday_reg_date` varchar(20) NOT NULL, `birthday_child` varchar(40) NOT NULL, `birthday_parent` varchar(40) NOT NULL, `birthday_age` varchar(11) NOT NULL, `birthday_party_date` varchar(15) NOT NULL, `birthday_contact_number` varchar(15) NOT NULL, `birthday_email` varchar(25) NOT NULL, `birthday_visited` char(20) NOT NULL, `birthday_action` text NOT NULL, `birthday_status` text NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  2. the apostrophe's (') and quotes (") will give you some issues when trying to load this data. when you try to load the data, is it giving you any error messages?
  3. to import data from a file you need to know some characeristics of the file being loaded (column value separators, line separators, values enclosed with, etc) a csv file usually separates the values using a comma (,) encloses the values with quotation marks (") and separates the lines with a return (\r) try using this query: load data infile 'file.csv' into table birthdays fields terminated by ',' enclosed by '"' lines terminated by '\r';
  4. try something like this: $sql = "SELECT DISTINCT Name, EventNo, Event, Score FROM {table name} ORDER BY Score DESC LIMIT 4";
  5. i would set up a view that averages the ratings from the ratings table with the id to the places table. this way you can just do a search from the view and get a 'top whatever' list according to the averages.
  6. what kind of output are you looking for? i'm not understanding what you want your final result to be.
  7. $array[] = $_POST['wholeNum']; $array[] = $_POST['fraction']; $array[] = $_POST['meassure']; $array[] = $_POST['ingredient']; $string = implode(' ',$array); echo $string; or $wholeNum = $_POST['wholeNum']; $fraction = $_POST['fraction']; $measure = $_POST['meassure']; $ingredient = $_POST['ingredient']; $array = array($wholeNum, $fraction, $measure, $ingredient); $string = implode(' ', $array); echo $string;
  8. make sure your query is pulling the manager's email addy from the database. $query = mysql_query("SELECT `pm_name`, `email field` FROM `projectmanager`") or die (mysql_error());
  9. this is what i would do..... if you populate the value of the drop down with the email addy of the managers 'value="{$data1['manager_email']}"' just submit your $_POST value to your email script and set the $to variable to the $_POST $to = $_POST['projectmanager'];
  10. $query = "LOAD DATA LOCAL INFILE 'ip-to-country.csv' INTO TABLE ipcountry FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\r\n'"; the lines terminated by looks for the Return (\r\n) on the line from the manual:
  11. <select name="selectbox"> <option value="Select">Select</option> <option value="Option 1" <?php if(isset($_POST['selectbox'])){ echo 'selected="selected"';} ?> >Option 1</option> </select> use an if statement to check to see if the $_POST value is valued...if it is then echo 'selected="selected"' to keep the selection when the form reloads. this can work for input fields as well just echo the value of $_POST into the 'value' attribute. hope this helps
  12. give an example of when it works and when it doesnt (show the queries for each)
  13. try UNION $query = "(Select * from timoff WHERE todaysDate = '$date') UNION (Select * from verifieroff WHERE todaysDate = '$date')";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.