RE: [PHP] PHP MySQL Insert Syntax



Insert is for a new row

Alter or Update is for an exsisting row





/*I'm trying to insert values from an array into MySQL DB but the insert
begins at the last record in the table and not at first record in the table.
I have added the cellSuffixes column after I already populated 30 records in
other columns*/

Code:

foreach($list as $key=>$value)
{
$query = "INSERT INTO carriers (cellSuffixes) VALUES('$value')";
mysql_query($query,$connex) or die("Query failed: ".
mysql_error($connex));
}
echo "done";
mysql_close($connex);

//I don't know what the sytax s/b to get the data to be inserted in the
first row of the column.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.



Relevant Pages

  • PHP MySQL Insert Syntax
    ... /*I'm trying to insert values from an array into MySQL DB but the insert ... begins at the last record in the table and not at first record in the table. ... I have added the cellSuffixes column after I already populated 30 records in ...
    (php.general)
  • Re: [PHP] PHP MySQL Insert Syntax
    ... Alter or Update is for an exsisting row ... /*I'm trying to insert values from an array into MySQL DB but the insert ... begins at the last record in the table and not at first record in the ... I have added the cellSuffixes column after I already populated 30 records ...
    (php.general)
  • IDA expertise gezocht : an array of a user-defined structure
    ... I'm working with IDA, ... What I can't seem to do is to create an array of records. ... first record: The array shows the first record as defined, ... In the code only offsets to the first record are translated into ...
    (comp.lang.asm.x86)
  • Re: PHP MySQL Insert Syntax
    ... you can use this query to update all the records in the table: ... begins at the last record in the table and not at first record in the table. ... I have added the cellSuffixes column after I already populated 30 records in ... first row of the column. ...
    (php.general)
  • Efficiency Question: Large Arrays vs. Indexed Files on Alphas
    ... am writing a program in Basic that will run on each box, ... decide to read some fields of some records into an array and ... maintain records that will eventually be written to an output file ... write the first record to the output file and just update each ...
    (comp.os.vms)

Loading