SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    array values missing

    hi,
    I am developing a script to pupulate a database.
    I have one problem tho, check the code: http://pastebin.com/8hpJ465k -50 lines of code, ~40 lines array.
    The first query enters the database , and then the second and third query , does not, because the arrays
    Code:
    $entry[$d]['subTitle']
    $entry[$e]['param']
    does not exist ,( anyway they exist.)
    Little help needed here.

  2. #2
    SitePoint Member
    Join Date
    Nov 2010
    Location
    florida
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you created a database?

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Which line is failing?
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually the arrays were pretty messed up,
    i've done some testing and came up with this
    replace the line:
    Code:
    				$sql="Update wd_hdd_specifications set subtitle='".$entry[$d]['subTitle']."'
    							where hdd_id='".$hdd_id."';";
    with
    Code:
    				$sql="Update wd_hdd_specifications set subtitle='".$entry['subTitle'][$d]."'
    							where hdd_id='".$hdd_id."';";
    tnx for your help anyway.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •