Skip a Value in SQL?

That doesn't really make sense, no.

You mean when INSERTing? Just specify the values you actually want to add:

Code:
INSERT INTO foo
(bar, baz)
VALUES ("foibles", "lol")

That'll work regardless of whether foo has 2, 4 or 48 columns.
 
Thought it didn't make much sense.

What I am trying to do is on a webpage in php the following from my Access database.

tablevw9.jpg


I can get the values but not in the second column.

It just starts below the first column.

Like below:

table2at9.jpg
 
Code:
$result = mysql_query("SELECT * FROM foo");

$i = 0;
while ( $row = mysql_fetch_assoc($result) ) {
    echo $row['bar'];
    if ( ++$i % 2 == 0 )
        echo '<br />';
}

Change the markup to suit you obviously but that's the principle :k
 
Last edited:
Back
Top Bottom