Results 1 to 6 of 6
May 18, 2009, 23:41 #1
- Join Date
- May 2009
- 0 Post(s)
- 0 Thread(s)
? How do I check db if user exists update else insert?
I'm trying to setup a twitter script that will update a users description, url, and photo.
I've got everything working where it will insert, I was trying to use the replace function but not having any luck, here's what I have so far:
$xml = new SimpleXMLElement($xmlstring); $pimage = $xml->profile_image_url; $pdesc = $xml->description; $purl = $xml->url; $process_profile = "REPLACE INTO twitter_cache SET twitter_user ='$twid', pimage = '$pimage', pdesc = '$pdesc', purl = '$purl'"; mysql_query($process_profile) or die(mysql_error());