The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A patching question..
#6
speaking of the db, I'm comfortable creating a patch file to update or create table/rows/columns etc, until i want to add multiple values to multiple columns, for example:

lets say my table is:
<pre>
Code:
$ctr1 = $db->query("CREATE TABLE <code>poppies</code> (
  <code>id</code> int(11) NOT NULL,
  <code>name</code> varchar(50) NOT NULL,
  <code>alpha_2</code> varchar(2) NOT NULL,
  <code>alpha_3</code> varchar(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1");

$ctr2 = $db->query("ALTER TABLE <code>poppies</code> ADD PRIMARY KEY (<code>id</code>)");
$ctr3 = $db->query("ALTER TABLE <code>poppies</code> MODIFY <code>id</code> int(11) NOT NULL AUTO_INCREMENT");
</pre>

now i want to update the table with multiple values for each column, for instance in column "name" i have 20 poppy names i need inserting,

normally if it was one value i would just do this:

<pre>
Code:
$fields = array(
  'name'  => 'yellow poppy',
  'alpha_2'  => '',
  'alpha_3'  => '',
);
$ctr4 = $db->insert('poppies',$fields);
</pre>


can user spice handle this ? or do i just have to import .sql via phpmyadmin?
  Reply


Messages In This Thread
A patching question.. - by wickey312 - 05-02-2017, 07:40 PM
A patching question.. - by mudmin - 05-03-2017, 01:39 PM
A patching question.. - by wickey312 - 05-09-2017, 01:22 PM
A patching question.. - by Brandin - 05-09-2017, 07:04 PM
A patching question.. - by wickey312 - 05-09-2017, 07:17 PM
A patching question.. - by firestorm - 05-09-2017, 07:31 PM
A patching question.. - by mudmin - 05-09-2017, 09:54 PM
A patching question.. - by mudmin - 05-09-2017, 09:58 PM
A patching question.. - by faguss - 05-28-2017, 09:21 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)