Little help with yet another advanced query...
Suppose I want to add a new settinggroup and settings to the vBulletin Options section of the admin cp. I know that to do this, I add a new record to the settinggroup table, like so: INSERT INTO settinggroup (settinggroupid,title,displayorder) VALUES (xx,"Group Title",xx);. I also know that to add settings to that setting group, I would use something like: INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (nn,xx,"Setting Name","$varname","1","Description about setting","yesno",yy);.
Now my question is, if I use NULL for xx while creating the settinggroup so that it takes the next auto-increment number, is there a way I can do the second query, making the setting, so that it uses the same number for xx? Some kind of join or something where it looks in settinggroup for a settinggroupid where the title equals "Group Title"?
|