Jump to content

Lienne

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

About Lienne

  • Birthday 08/14/1984

Profile Information

  • Gender
    Not Telling
  • Location
    California

Lienne's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am currently working on a site which has its visitors purchase access to a series of videos. I don't want to handle the payment processing any more than I have to (mostly because I'm scared...lol) and I can't seem to find a storefront which has this sort of thing built in. The way that I'm seeing this, the user would select the product on my site, and then be redirected to a store page, which will handle the payment processing. The result of a successful payment would then be a change in my DB to reflect the user's new purchase. Does that sound like a good way to go about it, and how can I do this? I have no idea even where to begin on this, so ANY sort of guidance, however small, would be immensely helpful.
  2. I've been working on this script for a few days that's driving me crazy. I finally made some good breakthrough, and discovered another odd problem. I'm trying to read all of the rows in my DB and return the mssql_num_rows. For some reason, however, it will only return 999 of them. Is this normal or did I just do something stupid? ???
  3. Oh man, I figured it out. I hadn't noticed it earlier. So thank you, your telling me to echo the sql statement actually helped a lot. The house number was the same on both rows, and it's reproducing the problem now.
  4. I tried echoing the SQL statement, and it looks fine. For some reason though, the database still has some problems. For instance, there are two row 8 and no row 7. But the output looks like: [code]6: UPDATE contacts_temp SET counter=6 WHERE deleted='1' AND id='' AND street_name='ALABAMA' AND prefix_directional=' ' AND street_suffix=' ' AND post_directional=' ' AND house_number='2105' 7: UPDATE contacts_temp SET counter=7 WHERE deleted='1' AND id='' AND street_name='ALABAMA' AND prefix_directional=' ' AND street_suffix=' ' AND post_directional=' ' AND house_number='2109' 8: UPDATE contacts_temp SET counter=8 WHERE deleted='1' AND id='' AND street_name='ALABAMA' AND prefix_directional=' ' AND street_suffix=' ' AND post_directional=' ' AND house_number='2109'[/code]
  5. Hi all, So I'm getting some strange results from one of my scripts. I have an MSSQL DB which has a list of peoples' addresses. I need to do some other processing to the data, so I decided to assign each person a "counter" (basic ID). In comes the troubling script. Bascially, the script iterates through every row in the DB and assigns it a number one higher than the last row. Very simple. But for some reason, it's not working exactly properly. The echo that I put in the script shows everything working perfectly fine. But for some reason, in the DB itself sometimes the numbers are not correct. For instance, one time through it looked like this: 1 2 3 351 5 ... And the crazy thing is that there was no 4. Nowhere. Another time, there were 2 4's. This problem seems to be randomly scattered throughout the rows with various incorrect numbers. So does anyone know why there would be an inconsistency between the echo output and what is actually put in the DB? I'm quite stumped on this one....help! [code]<? include("includes/db.inc.php"); $counter = 0; //init counter $master_results = mssql_query("SELECT * FROM contacts_temp WHERE deleted='1' AND id=''"); //get resident results $master_numrows = mssql_num_rows($master_results); for ($i=0; $i<$master_numrows; $i++) { $master_row = mssql_fetch_array($master_results); $street_name = $master_row['street_name']; $prefix_directional = $master_row['prefix_directional']; $street_suffix = $master_row['street_suffix']; $post_directional = $master_row['post_directional']; $house_number = $master_row['house_number']; $master_results2 = mssql_query("UPDATE contacts_temp SET counter=$counter WHERE deleted='1' AND id='' AND street_name='$street_name' AND prefix_directional='$prefix_directional' AND street_suffix='$street_suffix' AND post_directional='$post_directional' AND house_number='$house_number'"); echo $counter . "<br>"; $counter++; } ?>[/code]
  6. ooh, ingenius. so Instead of using a positive number to move to the right, we us a negative to move to the left (which is the end). Great! Thank you very much!
  7. Like the topic says, I have a string of variable lengths, and I want to find out what the last two characters are. Thanks in advance!
  8. If I access the scripts through localhost everything works fine, but if I try to run them through the IP (even on the machine the server is installed on) I get it asking me for a username/password/domain and if I click cancel, it tells me I don't have proper priveledges to access that file. It seems to be only happening for php scripts, too. I first tried installing PHP manually, and that worked ok. I then switched to the installer (cgi). Any assistance would be ENORMOUSLY appreciated!
×
×
  • 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.