The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query Help - Just a question about writing a query...
I'm praciticing some queries and I have a couple questions. First, let me explain my practice queries -
I figured I'd just write a bunch of "INSERT INTO"'s for different calendar events (general holiday stuff). [sql] INSERT INTO calendar_events (eventid, userid, event, eventdate, public, subject, allowsmilies) VALUES (4, 1, 'Thanksgiving - US.\r\n\r\n\r\n', '2003-11-27', 1, 'Thanksgiving', 1); [/sql] My question is this - Must I set the eventid, or is there a way to have it automatically set itself. Reason being - I have events already added to the calendar and I just wondered if I needed to consecutively add all the eventid's appropriately or if it could do it magically itself. |
#2
|
||||
|
||||
look into the field properties, if the field has the autoincrement enabled you can just set NULL as id and it'll use the highest free id
|
#3
|
||||
|
||||
Quote:
I believe it has autoincrement enabled for the eventid. Yes. *test* Sweeet! Thanks, Xenon. It worked like a charm. [high]* Rose takes note in lil' fat cheatsheet book and chalks another learning point up [/high] *hehe* |
#4
|
||||
|
||||
Ok just another question that would build on this one. When I wanted to query for that information to echo it out for whatever and I set up a query somewhat like this:
PHP Code:
Sorry for the all questions I'm just very interested. |
#5
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|