form handler not working, have a look


I'm trying to use a form to add some info to my DB. I'm a noob so I have cut and pasted my way to get to this point, but I am stuck as to why this is not working. There are 2 parts to my code... the first is the actual form and then the second is the form function. This is the form: PHP Code: OpenTable();
\t\t//thisisadd-officeform
\t\t{
\t\tprint"";
\t\techo"Usetheformbelowtoaddadditionaloffices."
\t\t.""
\t\t."
Step1,pleasecheckwherethisofficeislocated.

"
\t\t."
Posted On: Wednesday 24th of October 2012 09:22:23 PM Total Views:  185
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Will upgrading mysql delete my tables information?

hi i want to upgrade mysql 3.x.x to 4.x and php to 4 from 3. Will this upgrading delete the data stored in my mysql database now i am going to do it on linux.
VIEWS ON THIS POST

153

Posted on:

Wednesday 24th October 2012
View Replies!

Date format help [was: SQL idiot needing help!!]

Thanks for reading my post, I need help with a date calculation. I want to delete certain rows in my database where - date1 < getdate - 1 year
VIEWS ON THIS POST

123

Posted on:

Wednesday 24th October 2012
View Replies!

Incorrect information in file './database/table.frm'

This row is wrong: Code: innodb_data_file_path = ibdata1:10M:autoextend;/backup/ibdata2:50M:autoextend You can only define the last data file as autoextend. And apart from that why are you defining the first path as relative and the second as absolute pointing to /backup/ibdata2 /backup/ibdata2 sounds like a backup dir where you are copying files to. Not something that you should run from. And if you want to use an absolute path then you need to set the innodb_data_home_dir variable as an empty string like this: Code: innodb_data_home_dir = Also make sure that the log file size and log files in group are identical with what you have in the data directory. Those has also been know to trigger an error like the one you described.
VIEWS ON THIS POST

149

Posted on:

Wednesday 24th October 2012
View Replies!

Query help: selecting data points to form a GPS track

I have one more SQL challenge in this project.. and once again I turn to you... I have a table of timestamped lat/lon position records. Some come from a transponder and are coded "TRP"; some come from verbal position reports and are coded "POS". What I want to do is build a track based on the records. I'd like to use the transponder records as the primary source of data, only using a verbal record when there isn't a transponder record within 10 minutes of the record. times are in Unix Timestamps... My table looks like this: id, person_id, lat, lon, time, code 1, 1, 48.55, -124.55, 175747372, TRP 2, 1, 48.58, -124.54, 175747398, TRP 3, 1, 48.61, -124.53, 175748120, POS 4, 1, 48.66, -124.55, 175749120, TRP 5, 1, 48.65, -124.50, 175749125, POS I'd like to get everything except row 5 because row 4 is a TRP within 10 mins. Could someone help me with the query to make this happen Cheers, whiteatom
VIEWS ON THIS POST

239

Posted on:

Wednesday 24th October 2012
View Replies!

Select for Muli-rows information with a sum row also.

I don't know if this is possible, but I have a table called billing, in the billing table I have: id - Primary Key (Dosn't Do Anything Usefull) bizid - Business ID (Used to get info on the business) amount - Amount The Anoucment Cost closing - The Text Of The Annoucment Sumited time - Timestamp OK, So I want a page where all the information is layed out on one table with each annoucment displayed and a total of all the annoucments combined. Business Name `Anoucment Text` `Amount` `Anoucment Text` `Amount` `Total` Something Like That, I've used this SQL select to get the total and Business Name... but if i ask for a Anoucment Text or Amount it just shows one annoucment even if there are more than one, how can i fix this Code: SELECT orgbizid.name, billing.bizid, SUM(billing.amount) AS total FROM orgbizid JOIN billing ON orgbizid.id=billing.bizid GROUP BY orgbizid.name
VIEWS ON THIS POST

84

Posted on:

Wednesday 24th October 2012
View Replies!

MYSQL database transform

Can some one help please, I have a bookstore website, when I firstly creadted the mysql database I had I had a raw data ( on a note pad ) which I copied it into the the SQL and pressed go, so my database was created as it said INSERT INTO `products` VALUES (5, 99999, '', 'fruit.jpg', 1.9900, '2005-09-05 01:49:10', '2005-09-05 03:30:00', NULL, 0.00, 1, 0, 0, 0); now and after I have add many things on the site Id like to transform the existing data to the same format which will enable me to copy and paste the data into another site to create a new mysql database, can some one kindly tells me how to do that
VIEWS ON THIS POST

83

Posted on:

Wednesday 24th October 2012
View Replies!

How to store american DATE formate( like 27-02-2007) in mysql table???????????

hi, i need to know desperately the way of storing american DATE formate( like 27-02-2007) in mysql table.i searched on the web a lot,but didnt find anything.PLZ i need someone's help. , ok thanzzz to all......one thing.......if i hv a ORACLE server and a MYSQL server connected to a single network,then how could i do data operations among them since they store date in two different formats\t , so finally ......i take it that (forget about retrieving or any other thing)....in a MYSQL db table the only format DATE type takes is YYYY-MM-DD....isn't it\t\t\t , I think you are getting to technical Rudy, Yes the only date format that MySQL supports is YYYY-MM-DD.
VIEWS ON THIS POST

273

Posted on:

Wednesday 24th October 2012
View Replies!

LOAD DATA Date format yyyy-mm-dd

Solved it it was Pebkac I'm importing data from a text file to a mydsql databae 4.1 currently running on WindowsXP If I use LOAD DATA the date will not import. The year actually inserts itself into the next field which is decimal data type. The date format is yyyy-mm-dd. I've tried both CSV and tab delimited and same problem. Any ideas
VIEWS ON THIS POST

120

Posted on:

Wednesday 24th October 2012
View Replies!

Date format

hi i have data in date format for in time actually it should be 9:30 am and out time at 2:30 pm SELECT MIN(IN_TIME) AS IN_TIME,MAX(OUT_TIME) AS OUT_TIME FROM EMP_ATND_DETAIL AS ET, EMP_ATND_INFO AS EAI WHERE ET.EMP_ATND_INFO_ID=EAI.EMP_ATND_INFO_ID AND ATND_DATE = '2006-10-25' AND EMP_ID =24 +---------------------+---------------------+ | IN_TIME | OUT_TIME | +---------------------+---------------------+ | 2006-10-20 09:30:00 | 2006-10-13 01:30:00 | | 2006-10-24 02:30:00 | 2006-10-13 06:30:00 | | 2006-10-24 09:30:00 | 2006-10-13 01:30:00 | +---------------------+---------------------+ i have should get 9:30 am because that is lessser then 2:30 pm do i have SELECT name, emp_id, min(to_char(IN_TIME, 'DD/MM/YY HH24:MI')) in_time, max(to_char(OUT_TIME, 'DD/MM/YY HH24:MI')) out_time, FROM EMP_ATND_DETAIL thanxs
VIEWS ON THIS POST

112

Posted on:

Wednesday 24th October 2012
View Replies!

How to prevent one field form overlaping another

HI! I have the following table: lesson { id int, lesson_start int, lesson_end int, PRIMARY KEY(id) } No lesson can overlap another. So I can't have rows like: id | lesson_start | lesson_end 1 | 12:00 | 14:00 2 | 13:00 | 15:00 Is there any way to deal with it from the MySQL level
VIEWS ON THIS POST

77

Posted on:

Wednesday 24th October 2012
View Replies!

Date formatting

hello! i've got such values in the table: 1157012562. how to extract rows say for current month and current year PS i always dealt with ISO date format before and really stuck with NULL results i'm heaving using UNIX_TIMESTAMP() and YEAR() functions...
VIEWS ON THIS POST

204

Posted on:

Wednesday 24th October 2012
View Replies!

a way to store multiple pieces of information in any given cell (was "Um, Clueless")

Is there a way to store multiple and separate pieces of information in any given cell. Say i have a table that holds someones information, and under phone numbers i wanted a cell with the cell-phone, home-phone, and work-phone; except as separate peices of information accessed separately. Its actually for the inventory of a game im making. I would have done a search, but I didnt even know where to begin. This would be much easier than making a separte table for "bob", "jim", AND "rays" inventory. If not ill think something up, any suggestions or help is greatly appreciated, thx.
VIEWS ON THIS POST

124

Posted on:

Wednesday 24th October 2012
View Replies!

Sort_buffer_size to better performance?

, Code: mysql>show variables; sort_buffer_size | 2097144 i've read that if i increase sort_buffer_size queries will run faster, so is this value "2097144" good for a celeron 2.6 processor and 1GB RAMs or should I increase it for better and faster performance of mysql my website mainly uses mysql (( about 75 queries per second ))
VIEWS ON THIS POST

131

Posted on:

Wednesday 24th October 2012
View Replies!

Row Type to keep formatting

I am writing an app for our school newspaper to be posted online. I want to store everything in my MySQL db, but also want to keep the formatting when we put the articles in the DB. What should the row type be for this in order to keep the formatting (paragraphs mainly). Text puts it all together... Basically articles will be copied out of word into a field and I would like to eliminate the need to build in a WYSIWYG editor if possible... I appreciate your help!
VIEWS ON THIS POST

125

Posted on:

Wednesday 24th October 2012
View Replies!

Need help in forming a SQL.

Am not that strong in SQL's, Need some help, my situation is ., i have a table with data like +-----+---------+----------+ | id | name | value | +-----+---------+----------+ | 3 | color | blue | | 3 | color | black | | 2 | color | blue | +-----+---------+----------+ now the condition is it should return me `3` when the condition is ("name=color" and "value=blue") and ("name=color and value=black") and if the condition is only ("name=color" and "value=blue") then should return both 3 & 2.
VIEWS ON THIS POST

95

Posted on:

Wednesday 24th October 2012
View Replies!

Performance affected by tables?

I'm develloping a game which will have to store information about objects located in each square of a large grid. Since there can be many, or none, or a combination of different objects in any given square at a time, I figure I should create a table for each square on the grid containing the names of the objects in it. This may lead up to 1000-5000+ tables though, many of which could/will be empty, and I was wondering if that is the best approach I can take
VIEWS ON THIS POST

71

Posted on:

Wednesday 24th October 2012
View Replies!

Order by time (after converting to 24hr format)

I have three colums related to time in a table.(There are many other fields) 1. intHrs - To store Hour value of time 2. intMins - To store Minute value of time 3. vchAmPm - To store wheather it is AM or PM I want to select the rows order by time with 24 hour format something like Code: SELECT * FROM table WHERE condition ORDER BY ........
VIEWS ON THIS POST

109

Posted on:

Wednesday 24th October 2012
View Replies!

Some advice on performance needed

I have two tables. One for products and one for reviews. I have setup a detail page which displays the various fields out of the products table and then looks for all reviews in the reviews table which match the products key and display the average. good so far. I want to have a page which displays a whole list of the products and show their rating next to them but I'm wondering if making it search the reviews table and calculate the average for 50 products in one go is going to cause a bit of a strain on the server Is there another way I can do this, perhaps storing the precalculated average in the products table but how would I go about doing that Or is this not a problem Any input you can offer would be very much appreciated. Thank You.
VIEWS ON THIS POST

216

Posted on:

Wednesday 24th October 2012
View Replies!

Datetime format / display issue

hi there, i'm using datetime to store when quotes were created, they are currently displayed in the format -> YYYY/MM/DD - as specified by the datetime field structure in mysql my question is, for a uk based site that we are, how would we format the output of the datetime field for uk time -> DD/MM/YYYY is it possible or do I have to use a different field type
VIEWS ON THIS POST

141

Posted on:

Wednesday 24th October 2012
View Replies!

Performance - Processing of data at "query level" or at "programming level"?

I have a table containing info about football (soccer) games being played between teams. Structure: PHP Code: CREATETABLE`games`( \t`id`int(11)NOTNULLauto_increment, \t`game_id`tinyint(4), \t`team`tinyint(4), \t`goals_for`tinyint(4), \t`goals_against`tinyint(4), \t`win`tinyint(1), \t`draw`tinyint(1), \t`loss`tinyint(1), \tPRIMARYKEY\t(`id`) ) ('win', 'draw' and 'loss' fields are a not-very-pretty workaround I found for the "count() not returning 0" problem I detailed in another thread. They can be either 1 or 0, meaning 'true' or 'false' for each row) My question is: What is the best method of pulling the data from the database and displaying it in a table showing amount of games played, total points, wins, draw, losses, goal difference, etc Specifically: Is it better, performance- and resources-wise, to process the data on the query as such: PHP Code: SELECT t.nome,(SUM(p.win)*3+SUM(p.draw))ASpoints ,COUNT(p.id)ASgames ,SUM(p.win)ASwins ,SUM(p.draw)ASdraws ,SUM(p.loss)ASlosses ,SUM(p.goals_for)ASgoals_for ,SUM(p.goals_against)ASgoals_against ,(SUM(p.goals_for)-SUM(p.goals_against))ASgoal_difference FROMgamesp,timest WHEREp.team=t.id GROUPBYt.nome ORDERBYpointsDESC,winsDESC,goal_differenceDESC,gamesASC (Table 'times' is a simple table containing team id and team name. Sample output from the query: ) Code: nome points games wins draws losses goals_for goals_against goal_difference Botafogo 4 3 1 1 1 10 6 4 Fluminense 4 2 1 1 0 3 2 1 Flamengo 3 3 1 0 2 6 11 -5 or is it better to just pull the "raw" data from the database as it is now and then process it using php Oh, and just for the record, EXPLAIN SQL on that big query tells me: Code: table type possible_keys key key_len ref rows Extra p ALL NULL NULL NULL NULL 8 Using temporary; Using filesort t ALL id NULL NULL NULL 3 Using where
VIEWS ON THIS POST

79

Posted on:

Wednesday 24th October 2012
View Replies!