Jump to content

pwdrskier4

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pwdrskier4's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=378806:date=May 31 2006, 01:04 PM:name=Jon Tjemsland)--][div class=\'quotetop\']QUOTE(Jon Tjemsland @ May 31 2006, 01:04 PM) [snapback]378806[/snapback][/div][div class=\'quotemain\'][!--quotec--] Try something like this: SELECT mls.mls_num FROM mls LEFT JOIN geodata ON (mls.mls_num = geodata.geodata_mls) WHERE geodata.geodata_mls is NULL; [/quote] That totally worked, thank you so much. I actually had already solved my issue by dumping the #'s from the geodata table into an array and then comparing them to the #'s from mls table but this is much simpler. Thanks!
  2. I have two tables (mls and geodata) that each have mls numbers as primary key. I am trying to return all off the records in table mls where the mls number does not have a row in geodata. My current statement is returning too many records. I have 8 records in mls and 3 records in geodata (all of which match an mls # in table mls) so I should get 5 records returned but instead get 21 (8 * 3 minus the 3 matches). Can anyone help? [code]SELECT mls.mls_num, geodata.geodata_mls FROM mls, geodata WHERE mls.mls_num != geodata.geodata_mls ORDER BY mls_num ASC[/code]
  3. Hi, I am having trouble with this. I have two tables that both have a primary key named 'myid'. Basically, I am trying to loop through the rows of the first table and check to see if a row with the primary key of the same value exist in the second table. Here is what I have so far but it is not working properly. [code]<?php do { $check = $row_Recordset1['table1_id']; if ($row_Recordset2['table2_id'] == $row_Recordset1['table1_id']){ echo "$check exists in table 2<br />"; } else {echo "$check does not exist in table 2<br />";} } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); echo "<br />Done <br />"; ?>[/code]
  4. I am looking to upload images from remote locations without the use of a form. For Example, I want to specify a url such as 'http://www.example.com/pics/image3.jpg' in a php variable and have it uploaded, preferably while making a thumbnail. I have my current upload script below which I use with a form, I just need help with getting a image from a remote url into it. Thanks for the help! In this code, the image gets given the name 1000.jpg [code]<?php $val = '1000'; //pick a file extension if (eregi('^image/p?jpeg(;.*)?$',     $_FILES['upload']['type'])) { $extension = '.jpg'; } else { echo "ERROR: This File is not a JPEG."; } $filename2 = $val . $extension; $filename = '../images/' . $val . $extension; $filename3 = '../thumbs/' . $val . $extension; if (is_uploaded_file($_FILES['upload']['tmp_name']) and copy($_FILES['upload']['tmp_name'], $filename)) {         echo "<center><p>File stored successfully as $filename!</p></center>"; } else { echo "<center><p><strong>Could not save file as $filename!</strong></p></center>"; } ?>   <?php // Set a maximum height and width $width = 200; $height = 200; // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); if ($width && ($width_orig < $height_orig)) {    $width = ($height / $height_orig) * $width_orig; } else {    $height = ($width / $width_orig) * $height_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, $filename3, 66); ?> [/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.