Jump to content

tcollie

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tcollie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. about the error...the error isnt on the confi.php...because I can connect to the database etc.... the problem is in the script that updates the table on the database...I suppose.... ??? //// You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET comentario='' WHERE id='0'' at line 1 Is there actually a record with the ID '0' since you're trying to UPDATE a record and not INSERT a record?
  2. Silly question here, but in the returned message that you get, it shows: [mobile number]@vtext.com as the recipient. Shouldn't you actually put the number in place of [mobile number]??
  3. Maybe because vtext.com is down? I keep getting a server not found error when I try and access it. Might be part of the problem? But I dunno.
  4. Actually, believe it or not, you don't have to group. After more fidgeting with the code, and kicking my dog (i love my computer more than the dog) this finally fixed it: SELECT DISTINCT l.locked_case_id as locked_case_id, l.uid, u.username as username FROM la_comments l LEFT JOIN users u on l.uid = u.uid where l.status = 1 BTW, I didn't really kick my dog. Thanks for everyone's help on this.
  5. yep. no luck by removing DISTINCT. I use the following SQL to get the actual count of DISTINCT updated records select distinct locked_case_id from la_comments where status = 1 and it works well. I just can't figure out how to join it on my users table to get their username.
  6. I'm using the supplied PHP IPN from the PDN and it's unaltered except for my database update scripts to update my users, so just find this line: // send an email in any case echo "Verified"; mail($notify_email, "VERIFIED IPN", "$res\n $req\n $strQuery\n $struery\n $strQuery2"); Then add in your user update scripts. You will want to add a "custom" field to your actual form and then retrieve the value of your "custom" field in the IPN which will come through as $custom. I use the "custom" field to include the USER ID of my user.
  7. I'm having problems with a SELECT DISTINCT statement with an INNER JOIN. Here is the table structure for my tables: 'locked_accounts' locked_account_id uid 'la_comments' comment_id locked_case_id uid status 'user' uid username And here is my SQL: SELECT DISTINCT l.locked_case_id as locked_case_id, l.uid, u.uid as uid, u.username as username FROM la_comments l LEFT JOIN users u ON l.uid = u.uid where status = 1 What I'm trying to accomplish is getting a display of updated accounts (where status=1) and I want to display their username. In the la_comments table, there might be 50 distinct 'uid's, but I only want to display the distinct uid/username's where the status = 1. Can someone point me in the right direction on this. I've messed with this for a couple of hours and I'm at wits end. Not very bright I am when JOIN statements it comes to.
  8. thanks for the help teng. Apparently I've been slamming my head on my desk over nothing. Always have to make a big deal out of everything. Thanks again for your help.
  9. Basically what I want to do is this. I have table with about 20 fields in it. I want to be able to dynamically pull the data for a certain record and create an array with the keys as the fields names and of course the data as the value. Here's what I have so far (and it's not working ): function get_data($record_id) { $query = mysql_query("SELECT * FROM table where record_id = '$record_id'") or die(mysql_error()); while($row = mysql_fetch_array($query )) { foreach ($row as $key => $value) { $data .= "&$key=$value"; } } return $data; } Now I want to be able to call the function and work with the data I'm trying to call. $record_id = 'xxxxxxxxx'; $test = get_data($record_id); $name = $test['username']; //This would be the username field from the table echo $name; All I get is a blank screen when I run this and I know the problem is in the foreach statement I tried to write. Any suggestions here? Thanks in advance.
  10. The problem is this. When using heredoc strings you can't have a line indention before your closing tag. So this example does work. <?php $test = 1; if($test == 1){ echo <<<END Monkey has brains END; }else{ echo "monkey has no brain!"; } ?> If you'll notice the closing tag END; has no space before it. It you add spaces, or any other information in front of it, it won't work. Hope that helps you out some.
  11. or do what i do, simply run a cron job every 5 minutes (or however long you want the interval to be) to delete records from your "online" table where the last_active time is greater than X minutes from the current time. Here's how mine works. My cron job runs every five minutes. If there are any records where the last active time is greater than the current time - 10 minutes, then I delete them from the "online" table. That help any?
  12. Sounds like you want to "automate" the process when the buyer updates the status to received, the payment (less fee) is automatically sent. I haven't really used my PayPal account in a while, but I'm pretty sure then answer will be no. I don't think you can automate PayPal, or any other payment gateway to send automatic payments to another user of their service, but I could be wrong. Of course, if you want to send the payments yourself, then this is completely workable. You simply set up your system to notify you, or person authorized to act on your behalf, when the Buyer updates the status to "received" and then you simply pay the seller the amount (less fees) received from the buyer.
  13. I have the following code for finding exact matches for records in my users table containing the same ip address. SELECT * FROM users WHERE ipaddress IN (SELECT ipaddress FROM users GROUP BY ipaddress HAVING COUNT(*) > 1) This returns a listing of user accounts with the EXACT SAME ip address registered. What I want to also be able to find is records with similar IP addresses. For an example, 127.0.0.1 127.0.0.15 would be returned as similar matches. I currently only want to ensure that the first 3 parts (127.0.0.*) are exact matches and the fourth part of the ip is the wildcard. Can somebody help me out with this or point me in the right direction.
  14. You need to add ob_start(); at the beginning of your code.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.