Menu

add & update seems to be not working

Help
2012-04-17
2012-06-07
  • Yossi Natanson

    Yossi Natanson - 2012-04-17

    I have tried to add someone to my php-addressbook 7.00 466 (it worked fine in
    6.12) and the person wasn't added

    I tried to modify someone and again, the modification wasn't accepted

    I had no error message

    any ideas why does it happen?

    thanks

     
  • Yossi Natanson

    Yossi Natanson - 2012-04-17

    P.S.

    I looked into the tables with phpadmin and the changes were'nt there

     
  • chatelao

    chatelao - 2012-04-17

    Hi Yossin,

    Did you apply the upgrade scripts, especially 6.2 to 6.3?

    Regards

    Olivier

     
  • Yossi Natanson

    Yossi Natanson - 2012-04-18

    I have applied the script in 7.0 version, 6.3 never rolled out as "version"

    how do I know what to do with the database?

     
  • chatelao

    chatelao - 2012-04-18

    Could you send an Export or screenshot of your "addressbook" table?

     
  • Yossi Natanson

    Yossi Natanson - 2012-04-19

    -- phpMyAdmin SQL Dump
    -- version 3.4.9
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Apr 19, 2012 at 12:40 AM
    -- Server version: 5.0.95
    -- PHP Version: 5.2.9

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

    SET time_zone = "+00:00";

    /!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;

    /!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;

    /!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;

    /!40101 SET NAMES utf8 /;

    --
    -- Database: yossin_mnl07
    --


    --
    -- Table structure for table addr_addressbook
    --

    CREATE TABLE IF NOT EXISTS addr_addressbook (

    domain_id int(9) unsigned NOT NULL default '0',

    id int(9) unsigned NOT NULL auto_increment,

    firstname varchar(255) NOT NULL default '',

    lastname varchar(255) NOT NULL default '',

    nickname varchar(255) default NULL,

    company varchar(255) NOT NULL default '',

    address text NOT NULL,

    addr_long text,

    addr_lat text,

    addr_status text,

    home text NOT NULL,

    mobile text NOT NULL,

    work text NOT NULL,

    fax text NOT NULL,

    email text NOT NULL,

    email2 text NOT NULL,

    email3 text NOT NULL,

    im text NOT NULL,

    im2 text NOT NULL,

    im3 text NOT NULL,

    homepage text NOT NULL,

    bday tinyint(2) NOT NULL default '0',

    bmonth varchar(50) NOT NULL default '',

    byear varchar(4) NOT NULL default '',

    aday tinyint(2) NOT NULL default '0',

    amonth varchar(50) NOT NULL default '',

    ayear varchar(4) NOT NULL default '',

    address2 text NOT NULL,

    phone2 text NOT NULL,

    notes text NOT NULL,

    photo mediumtext,

    x_vcard mediumtext,

    x_activesync mediumtext,

    created datetime default NULL,

    modified datetime default NULL,

    deprecated datetime NOT NULL default '0000-00-00 00:00:00',

    password text,

    login date default NULL,

    role text,

    PRIMARY KEY (id,deprecated,domain_id)

    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1775 ;

     
  • chatelao

    chatelao - 2012-04-19

    Sorry, the title column is missing. Copy the "alter table add column company"
    statement from the last upgrade, then replace "company" by "title".

    Sorry O.

    PS: I will fix this in v7.0.1

     
  • Yossi Natanson

    Yossi Natanson - 2012-04-19

    I don't see it in the sql script.

    do you mean adding a column "title" with the same defenitions as "company"?

     
  • chatelao

    chatelao - 2012-04-19

    Yes, apply this:

    ALTER TABLE addressbook ADD title varchar(255) default NULL AFTER
    company;

     
  • Yossi Natanson

    Yossi Natanson - 2012-04-19

    1- thank you VERY MUCH

    2- is there a practical reason for the "AFTER" item or it's just good
    practice?

     
  • chatelao

    chatelao - 2012-04-20

    You're welcome, it's nice to have some quality assurance :-)

    The "after" is required if you want to add the columns in the exact same
    order. The application does not require this, but you may have some logic
    doing so. I would recommend to keep the structure as close as possible to the
    "absolut" one of "addressbook.sql".

     

Log in to post a comment.