userfield.field5 doesn't exist
DamienMcKenna - April 21, 2009 - 01:01
| Project: | vBulletin to Drupal |
| Version: | 6.x-1.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
I'm getting an error migrating a v3.7.2 site to D6 using the rc1 code stemming from the following code:
<?php
// Gender
$sql = 'INSERT IGNORE INTO %s (fid, uid, value) ';
$sql .= 'SELECT fid, userid+%d, field5 ';
$sql .= 'FROM {userfield}, %s ';
$sql .= 'WHERE name="user_gender" AND (field5="Male" OR field5="Female");';
?>If this is a customizable field it should only be executed if applicable.

#1
Oh, btw, besides this one error it seems to work just great! :-)
#2
This is a duplicate of: #337390: Unknown column 'fieldx'
I'd love to only execute it if applicable, but there's no standard SQL way of checking whether a column exists. That's because a database schema is not supposed to change dynamically, the database design of vBulletin is really messed up when it comes to these fields! :)
I will work out another way (check vBulletin's settings or something), but it's not a huge priority. The import works fine, even with this annoyance! Glad to hear your import went well. Oh, and feel free to comment out those lines, if the error irritates you.