vBulletin Modifications

How to convert Old vb code to New vb Code

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 09-23-2006, 04:42 PM   #1
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

I would like to learn how to update code for alot of the old vb3 code. Learning the sql read, write, fetch, array code is very important, since alot of the call function's seem to have changed.


so how do you know which query call to use........there seems to be so many at this point?
You must first be a registered member to view any code.
You must first be a registered member to view any code.
and there are a bunch more........

I think the above post is awesome and wish there was an area that actually shown the break down of coding php/mysql in laymens terms...

I have a piece of code i have been working on and i am stuck.....i have no idea if it is a query issue, a call issue or what.......This is just a brief piece of the code i have been working with:
You must first be a registered member to view any code.
which is a piece of code that still works in vb3.0 external.php......but with all of the changing software knowledge, and it is changing quickly, it's hard to learn. Just when you think you are starting to get a fair understanding of what's happening, bam........it's changed to a new and better version.
__________________
owner of www.insanemustangs.com and a bunch of ford mustangs.

Last edited by hotwheels; 09-24-2006 at 11:25 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-23-2006, 04:48 PM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Quote:
so how do you know which query call to use........there seems to be so many at this point?
Read:
You must first be a registered member to view any code.
Write:
You must first be a registered member to view any code.
A read query which only uses one line in the db:
You must first be a registered member to view any code.
E.G.
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 04:51 PM   #3
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

so this line:
You must first be a registered member to view any code.
should be:
You must first be a registered member to view any code.
And correct me if I am wrong but I can't find where the variable $post came from for this:
You must first be a registered member to view any code.
perhaps you meant:
You must first be a registered member to view any code.
And then for this you can't use "!=" in a query but you can do "<>" so you need:
You must first be a registered member to view any code.
That's what immiediatly strikes me.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 04:57 PM   #4
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

oh, there is alot more to the code, i was just sharing a brief synopsis of the file...........and dang man, that was a super fast response....thank you very much.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 05:31 PM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Quote:
and dang man, that was a super fast response....thank you very much.
I try my best




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 07:45 PM   #6
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

I know ya do, that's what i love about this site........

Very helpful.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 08:14 PM   #7
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

k, so if i have a query set up like this:
You must first be a registered member to view any code.
Where my information is going, basically like the vbpost query, in order to read and write from there, i would have to change
You must first be a registered member to view any code.
You must first be a registered member to view any code.
This is the file i am trying to work with:

in external.php version vb3.0
You must first be a registered member to view any code.
Which i changed to:

You must first be a registered member to view any code.
which should lead to these settings too in external.php:
old settings:
You must first be a registered member to view any code.
and

old version:
You must first be a registered member to view any code.
which i changed to:

You must first be a registered member to view any code.
what i have done so far, tries to work, but it just isn't pulling the information like it should.

Last edited by hotwheels; 09-24-2006 at 11:20 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-23-2006, 08:37 PM   #8
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

Just to add, once i run the above script, i should get:

Quote:
Loading learnwhat.xml
Loading data aiml file: http://www.yourforums.com/forums/external.php?type=AIML
Loading data aiml file: http://www.yourforums.com/forums/ext...type=AIMLSHARE
DONE LOADING
Inserted 44 categories into database
As you can see, i falsely stuck 44 into the catagory amount, just to show what it should look like after it has preformed the learner information.

but instead i get:

Quote:
Loading learnwhat.xml
Loading data aiml file: http://www.youforums.com/forums/external.php?type=AIML
Loading data aiml file: http://www.yourforums.com/forums/ext...type=AIMLSHARE
DONE LOADING
Inserted 0 categories into database




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-24-2006, 04:52 AM   #9
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

o.o this'll take some time to read through.

can you put your code in php tags please as that will work with my quotes.

I don't know if you can do this:
You must first be a registered member to view any code.
in the external file so it was probably best to put that back to
You must first be a registered member to view any code.
Also this is a read query not a write query so you need:
You must first be a registered member to view any code.
not:
You must first be a registered member to view any code.
And then:
You must first be a registered member to view any code.
You have specified the post id and then added it again on the end. Perhaps you meant:
You must first be a registered member to view any code.
and the second script looks ok but as far as I can see that is not supposed to add catergories that is just displaying posts....

Last edited by Nick R; 09-24-2006 at 05:07 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-24-2006, 11:28 AM   #10
vB User
Join Date: Jan 2006
hotwheels is on a distinguished road

Default

k, So if i understand this, query_write, sends the post information to the database? query_read, read's and pulls the information from the database?

Is it possible to use something like:

You must first be a registered member to view any code.
Instead of:

You must first be a registered member to view any code.
?

That way, it would do the write or read request without having to specify the exact call?

Last edited by hotwheels; 09-24-2006 at 11:30 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vb code for permisions MONKEY_MAN General vBulletin Support 2 08-14-2006 03:18 PM
User Cp Critical Error Nick R Site Feedback 6 08-03-2006 09:39 AM
Vb code problem John Mullins General vBulletin Support 4 06-22-2005 08:29 AM
Code Tag - Code Box Size A-FXP-D3LTA General vBulletin Support 2 04-16-2005 09:02 AM


All times are GMT -3. The time now is 08:12 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)