[PHP-DB] add a column to a table via PHP

2001-03-13 Thread Martin E. Koss
Hi, I'm probably being a bit lazy asking what I should be able to figure out, but here goes anyway: What I want to do, in response to certain other actions having taken place, is add a column to a mySQL database (FocusShop) table (Prices) and set the default value of that column and update all ex

RE: [PHP-DB] add a column to a table via PHP

2001-03-13 Thread Martin E. Koss
t;$defaultvalue\""; mysql_query($query) or die("Can't add column to Prices"); $query = "UPDATE TABLE Prices SET $column=$defaultvalue"; mysql_query($query) or die("Can't update table Prices"); And, yes, you are a bit lazy... This is in the manual. -Or

[PHP-DB] Dynamically build a form from mySQL table

2001-03-20 Thread Martin E. Koss
tabaseName = "FocusDynamics"; $TableName = "Items"; // open the table and get all field names, sizes, etc., // for each Field name, print something like: PRINT "\n"; PRINT "$FieldName\n"; PRINT "\n"; PRINT ""; How do I get all this info fr

[PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
I have been trying to get a new column added to a table (vips) via a PHP script, but having exhausted all the things I can find, I'm still struggling. I've referred t TFM for all those who just can't wait to tell me to do so, and believe my SQL statement is correct: $NewCol = $Prod_Code; $default

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
yes, I have full access rights. Using the same user and password (for example) as I use when using phpMyAdmin and have no problems altering tables with that. Martin. -Original Message- From: IceCold [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 13:18 To: Martin E. Koss Subject: RE

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
ng with my code below: Martin. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 14:05 To: [EMAIL PROTECTED]; Martin E. Koss Subject: Re: [PHP-DB] ALTER TABLE - code not working. Hello, "Martin E. Koss" wrote: > > I have been trying

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
le, but no error is displayed. Martin. -Original Message- From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 15:29 To: Martin E. Koss Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] ALTER TABLE - code not working. On Thu, Mar 29, 2001 at 12:20:41PM +0100, Martin E. Koss

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
lto:[EMAIL PROTECTED]] Sent: donderdag 29 maart 2001 16:29 To: Martin E. Koss Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] ALTER TABLE - code not working. On Thu, Mar 29, 2001 at 12:20:41PM +0100, Martin E. Koss wrote: > I have been trying to get a new column added to a table (vips) via a PHP > sc

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
on Stechschulte [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 16:54 To: Martin E. Koss Cc: Jason Stechschulte; [EMAIL PROTECTED] Subject: Re: [PHP-DB] ALTER TABLE - code not working. On Thu, Mar 29, 2001 at 03:53:07PM +0100, Martin E. Koss wrote: > I did what you suggested and (exactly as it appears

[PHP-DB] Multiple work mySql database search.

2004-04-21 Thread Martin E. Koss
Hi all you experts who have help me often in the past, may I now ask what is probably so simple for someone doing PHP everyday... I have a product database which can be searched for a keyword in up to 3 fields; using this select query: $sql_select = "SELECT * from productlist WHERE (Name LIKE '

[PHP-DB] Wrong table name - can it be fixed?

2004-05-17 Thread Martin E. Koss
I've made a big boo boo when exporting from MS Access to MySql database. The table name was '16-05' which obviously is not a good name to have in MySql. I'm using PhpMyAdmin as I'm not very experienced with sorting out the databases any other way. Problem is that I can't access the properties of th

[PHP-DB] JOIN - Not working.

2001-11-28 Thread Martin E. Koss
= mysql_fetch_array($phresult)) { $phTotal = $phrow["phTotal"]; PRINT "$phresult\n"; } // end WHILE Is there an obvious problem here and can anyone help? Martin E. Koss M: 07946-706459 E: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php

[PHP-DB] JOIN Very SLOW...

2001-11-28 Thread Martin E. Koss
7;))"; $phresult = mysql_query ($phselect,$conID); while ($phrow = mysql_fetch_array($phresult)) { $phTotal = $phrow["phTotal"]; PRINT "$phTotal\n"; } // end WHILE Is there an obvious problem here and can anyone help? Martin E. Koss M: 07

[PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
Hi, I have a table with 1,008 columns in it and at it's peak it has up to 500 rows of data. I want to enable my client to click on a link and the next thing they are prompted with is 'Save or Open' (the CSV file). The data will be compiled into a comma delimited CSV file but rather than be printed

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
John [mailto:[EMAIL PROTECTED] Sent: 16 June 2003 2:06 PM To: 'Martin E. Koss' Subject: RE: [PHP-DB] Save mySQL data into a CSV file. It's something to do with the header in the html page. -Original Message----- From: Martin E. Koss [mailto:[EMAIL PROTECTED] Sent: 16 June 20

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 16 June 2003 5:42 PM To: Martin E. Koss Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Save mySQL data into a CSV file. $qry = "SELECT * FROM TABLE_NAME"; $result_set = mysql_query($qry) or die(mysql_error()); ***this has to be called before any he