If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > how to skip an increment of 54 to insert in new db table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-10, 12:55
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 494
how to skip an increment of 54 to insert in new db table

Actually the question is based on the increment. But if anyone knows a better way of inserting table data into the database I'd like to hear it.

I had saved a db table into html and am now seeking the precise coding to insert into my new db table.

I modified by leaving out one field but adding another.

First I did a for loop to get all the <th> tags which have the field names by storing them in an array. Then I used the count() of that array within another for loop which has all the <td>. The array of the <th> serves as a multiple like this:


PHP Code:
$allths = array();
for(
$th=0$tdh<count($allths); $td++){
    
}
for(
$td=0$td<count($alltds); $td++){
    if(
$td %==0){ //I'm not exactly sure how the exact code is since I'm away from my computer 
//I think somewhere within the if statement I have to put count($allths)

    
}

I want to add the exception of one field or column, but insert the rest in their columns. Plus I have one column placed elsewhere in the db table (does it matter if it's not specified in order?)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On