CarolinaBlues
Nov 8 2005, 09:51 PM
QUOTE I got this query...
CODE
<?php error_reporting(E_ALL); //Tell all the things
$host="this_host"; $user="me"; $pass="secret_word"; $users_table="users_table_for_smf"; $member_group_col="column_name_for_member_group_in_smf"; $new_group_name="whatever"; $this_group="the_old_group"; $custom_field="custom_field_in_users_profile"; $this_value="the_value_for_custom_field";
mysql_connect($host,$user,$pass) or die ("Can't connect, was told : <br>". mysql_error()); mysql_select_db('smf') or die ("Can't open database, was told : <br>".mysql_error());
$query = "UPDATE $users_table SET $member_group_col = $new_group_name "; $query .= "WHERE $member_group_col = $this_group AND "; $query .= "$custom_field = $this_value ";
mysql_query($query); print("Updated records: %d\n", mysql_affected_rows()); ?>
but i need this modified cause custom profile field data is stored in smf_themes and the membergroup data is store in smf_members with MEMBER ID as the common field, I am hoping someone here can rewrite this for me to work cause I don't know php, i had to get someone to write me this qury but they don't know how toy use the SQL Join.
here is what i want this for: i need a php script to query the db, the smf users table and checks to entires in a users profile a custom field i made and the member group and if both match preset values then i want it to change the member group. i would just want this to be a php file that i can just randomly decide to goto, enter the url in firefox or any browser then it will run. Mine was so different from yours. Its all confusing and different coding.
Reply
Recent Queries:--
update join query for sql - 21.74 hr back. (1)
-
sql join script - 42.46 hr back. (1)
-
"update inner join db2" - 43.75 hr back. (1)
-
db2 update join example - 68.66 hr back. (1)
-
important questions about sql views - 91.94 hr back. (1)
-
db2 join querries - 92.78 hr back. (1)
-
sql join questions - 93.33 hr back. (1)
-
sql joins questions examples - 99.65 hr back. (1)
-
sql join questions to solve - 101.06 hr back. (1)
-
join sql questions - 117.02 hr back. (2)
-
question in joins sql - 126.75 hr back. (1)
-
sql join questions - 130.21 hr back. (1)
-
sql join question - 139.19 hr back. (1)
-
unsolved question of join in sql - 148.47 hr back. (1)
Similar Topics
Keywords : sql, join
- Warhammer Online: Age Of Reckoning
Join the WAAAGHH!! (1)
Alluraro
Come join us (1) Come join AllureRO a private ragnarok online server .Rates 20k/20k/500x Max level 999 max stat 1000
.Friendly Community .Friendly GMs .Many Customs .Events Daily Come join us i promiss you will
have a good time!! Forums - http://www.allure-ro.com/forums/index.php ? Control Panel -
http://allurero.systeminplace.net/ ....
How To Join Two Pages Togother
(3) I made i join link page and and i have a app form that i need to put into that page can anyone help
on that note....
Activision And Vivendi Join Forces
to create Activision Blizzard! (5) In a whacky and surprising move, Activision and Vivendi S.A had come together in a $18.9 billion
deal to merge Activision and Vivendi Games together to become Activision Blizzard. Both companies
have been successful with Guitar Hero, Call of Duty and the World of Warcraft series. More at
Kwokinator.com xboxrulz....
Please Help (php Join Script)
(5) Ok as you all know by now I have been working on a php based game
to help me learn php. It has been going great and it is almost done. I got some very good help on is
sues here and along with sites like php.net. However I am stuck and can not find a solution to a
problem anywere. My Problem: I want users to join but I don't want some charicters to be in
there name (example I dont want Disallowed Charicters: , ', " I would array like: CODE
$string = array( , ', "); This for some reason does not work for. CODE if(strpos($name,
$string)){ //error s....
Demonro-revolution, High Rate Quality Online Gaming Experience
We would like you to join us! (1) Dear users, I would like to invite you to come and play on a new High rate Ragnarok Online private
server. It's name is DemonRO-Revolution, and it is a high quality server, it has experienced
Support GameMasters and much more. Here is some information about the server: Are you good enough
to take part in this Revolution? DemonRO Revolution High Rate server, also known as Asylum, is a
server that fits your tastes. Asylum is a Player Kill server, and constantly updated with the
newest updates of the emulator. Asylum is very stable, and needs players to grow bigger ....
Fc Foster's: Review My Website
Visit our website and join to our team (1) Fc Foster's ....
Ideas For A Programmers' Association
JOIN!!! (19) Hi, Ev'ryone. I've got a suggestion for the ones that are quite capable af web-programming.
Let us make an organisation, an association of programmers. The aim of that association will be to
help eachother while programming. If you're in that organisation, and a problem you couldn't
solve yourself turns up, you may suddenly leave it on our forum and it will be solved together. To
join it, Leave here your suggestion. QUOTE 1. My real name. 2. My country. 3. My interests. 4.
My age. 5. Links to examples of my work. 6. what you are good at. ....
Join World Of Dungeon
(1) Very good text based game. http://world-of-dungeons.net/?link_ea_3469 ....
Free Private Sever For Ragnarok Online
Join and play for free! (4) Hey all, theres a private sever i play on.. total free, 15/15/15 sever, lvl cap 255. GM friendly.
and some new features being updated right now.. the sever is down for updates but will be back up
asap. Crimson-RO Hope you all enjoy! -Crimson-Ro Tech Support GM -Full Metal....
Blue Fusion
Hey join this game! (2) yo check this game out http://www.blfusion.com/register.php?ref=1748 ,a rpg exofusion game with
players, leaders, warriors, and followers. team work and a lone wolf.
http://www.blfusion.com/register.php?ref=1748 sign up today and become the one. /biggrin.gif'
border='0' style='vertical-align:middle' alt='biggrin.gif' /> You should also mention that that
links also gives you some points/other stuff, since it uses a reference number? I think you should
at least say that. ....
Ipbgaming.com Army System(like Kings Of Chaos)
Headed up by NilsC, please join... (0) Join the IPBGaming.com site, it is run by NilsC, and contains people from both Trap17, Astahost, and
some people I know from other sites that I beleive followed me... It is a fun game and you will love
it, try it out... Click Here For IPB Gaming ....
Funky Cool Irc Statistics With Avatars :)
If this is motivation enough to join IRC (12) HI all, For those who join us regularly on IRC and for those who don't as well - now, we have
hourly updated channel statistics being published at this address:
http://www.astahost.com/misc/ircstats/astahost.html .. For those who have no idea what channel
stats mean, just go ahead and take a look at that URL. Also as of today - those who wish to
include their avatars along with their nicks on the channel stats page, please mail me your avatars
at: microscopic.earthling@gmail.com. Due to space constraints on the page, I cannot accept avatars
larger than 80x56....
Whatpulse - Get Pulsing!
Join the astahost team! (40) WhatPulse?!?!?! For a little more community fun please join our WhatPulse team
http://whatpulse.org/stats/teams/6382/ WhatPulse is a program that counts how many keys and how
many clicks you use, it does NOT log what you type. It is a little competition and we can be at the
top! I mean come on look at our member count "2,056" with that we could go far, we could definately
get in the top 25 but we need your help. We NEED you to join our team. To get whatpulse join at
there site whatpulse.org and download there client. Its FREE! Then log into there site and join o....
Anyone Join My Chain In Age Of Mythology
newbie or export is ok (0) I have the chain in Age of Mythology it is DM_ We always play Deathmatch . If anyone is interesting
in it , give me the reply and tell me what is your name in ESO . We welcome all of people who
interesting in Deathmatch !!! Thank You Very Much ~!!....
Looking for sql, join
|
*SIMILAR VIDEOS*
Searching Video's for sql, join
|
advertisement
|
|