Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. Hey guys i got my export page to work but it looks super ugly..lol first of i can separate the lines with txt and the colums are not adjusting to the txt in it? like information line hear information 2 line hear.. Where the spaces are i want text.. $csv_output = '"PERSONAL","INFORMATION"'; $csv_output .= "\015\012"; $result = mysql_query("select * from APPLICATIONS WHERE ID= '$ID'"); while($row = mysql_fetch_array($result)) { $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[PERS_DATE_BIRTH].'","'.$row[PERS_SSN].'"'."\n"; $csv_output .= '"'.$row[PERS_DRIVERS_L].'","'.$row[PERS_CODE].'"'."\n"; $csv_output .= '"'.$row[PERS_ADD].'","'.$row[PERS_CITY].'"'."\n"; $csv_output .= '"'.$row[PERS_ADD_2].'","'.$row[PERS_CITY_2].'","'.$row[PERS_CODE_2].'"'."\n"; $csv_output .= '"'.$row[PERS_NUMBER].'","'.$row[PERS_CELL].'","'.$row[PERS_FAX].'"'."\n"; $csv_output .= '"'.$row[EMPL_E].'","'.$row[EMPL_CITY].'"'."\n"; $csv_output .= '"'.$row[EMPL_ADD].'","'.$row[EMPL_CODE].'"'."\n"; $csv_output .= '"'.$row[EMPL_TYPE].'","'.$row[EMPL_SINCE].'"'."\n"; $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[EMPL_P].'","'.$row[EMPL_N].'"'."\n"; $csv_output .= '"'.$row[EMPL_SUP].'","'.$row[EMPL_GS].'"'."\n"; $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_E].'","'.$row[EMPL_2_ADD].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_CITY].'","'.$row[EMPL_2_CODE].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_TYPE].'","'.$row[EMPL_2_SINCE].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_P].'","'.$row[EMPL_2_N].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_SUP].'","'.$row[EMPL_2_GS].'"'."\n"; $csv_output .= '"'.$row[OTHER_OWN_RENT].'","'.$row[OTHER_OWN_RENT_D].'","'.$row[OTHER_OWN_RENT_V].'","'.$row[OTHER_OWN_RENT_AM].'","'.$row[OTHER_OWN_RENT_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_CC_REER].'","'.$row[OTHER_CC_REER_D].'","'.$row[OTHER_CC_REER_V].'","'.$row[OTHER_CC_REER_AM].'","'.$row[OTHER_CC_REER_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_INV_CAR].'","'.$row[OTHER_INV_CAR_D].'","'.$row[OTHER_INV_CAR_V].'","'.$row[OTHER_INV_CAR_AM].'","'.$row[OTHER_INV_CAR_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_OTHER_L].'","'.$row[OTHER_OTHER_L_D].'","'.$row[OTHER_OTHER_L_V].'","'.$row[OTHER_OTHER_L_AM].'","'.$row[OTHER_OTHER_L_MP].'"'."\n"; $csv_output .= '"'.$row[email].'","'.$row[sTATUS].'"'."\n"; $csv_output .= '"'.$row[DATE].'","'.$row[ACCEPT].'"'."\n"; $csv_output .= "\015\012"; } //You cannot have the breaks in the same feed as the content. header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv; filename=document_" . date("Ymd") . ".csv"); print $csv_output; exit;
  2. i needed to go tru one by one to notice that i was missing a table associated with the values.. and a space like this ' me' i hate doing big query's like this..thx!
  3. this is the rest if (!$query) { die('Invalid query: ' . mysql_error()); } $id= mysql_insert_id(); echo "<p>This file has the following Database ID: <b>$id</b>"; echo "You'll be redirected to Home Page after (2) Seconds"; echo "<meta http-equiv=Refresh content=2;url=FILL.php>"; ?> [code=php:0]
  4. hey guys im going nuts with this and i cant find the error why it does not work?? $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); //Writes the information to the database $query =("INSERT INTO `APPLICATIONS` (PERS_L_NAME, PERS_F_NAME, PERS_DATE_BIRTH, PERS_SSN, PERS_DRIVERS_L, PERS_ADD, PERS_CITY, PERS_CODE, PERS_ADD_2, PERS_CITY_2, PERS_CODE_2, PERS_NUMBER, PERS_CELL, PERS_FAX, EMPL_E, EMPL_ADD, EMPL_CITY, EMPL_CODE, EMPL_TYPE, EMPL_SINCE, EMPL_P, EMPL_N, EMPL_SUP, EMPL_GS, EMPL_2_E, EMPL_2_ADD, EMPL_2_CITY, EMPL_2_CODE, EMPL_2_TYPE, EMPL_2_SINCE, EMPL_2_P, EMPL_2_N, EMPL_2_SUP, EMPL_2_GS, OTHER_OWN_RENT, OTHER_OWN_RENT_D, OTHER_OWN_RENT_V, OTHER_OWN_RENT_AM, OTHER_OWN_RENT_MP, OTHER_CC_REER, OTHER_CC_REER_D, OTHER_CC_REER_V, OTHER_CC_REER_AM, OTHER_CC_REER_MP, OTHER_INV_CAR, OTHER_INV_CAR_D, OTHER_INV_CAR_V, OTHER_INV_CAR_AM, OTHER_INV_CAR_MP, OTHER_OTHER_L, OTHER_OTHER_L_D, OTHER_OTHER_L_V, OTHER_OTHER_L_AM, OTHER_OTHER_L_MP, EMAIL, ACCEPT, STATUS, DATE) ". "VALUES ( '$PERS_L_NAME','$PERS_F_NAME','$PERS_DATE_BIRTH','$PERS_SSN','$PERS_DRIVERS_L','$PERS_ADD','$PERS_CITY','$PERS_CODE','$PERS_ADD_2','$PERS_CITY_2', '$PERS_CODE_2','$PERS_NUMBER','$PERS_CELL','$PERS_FAX','$EMPL_E','$EMPL_ADD','$EMPL_CITY','$EMPL_CODE','$EMPL_TYPE','$EMPL_SINCE','$EMPL_P', '$EMPL_N','$EMPL_SUP','$EMPL_GS','$EMPL_2_E','$EMPL_2_ADD','$EMPL_2_CITY','$EMPL_2_CODE','$EMPL_2_TYPE','$EMPL_2_SINCE','$EMPL_2_P','$EMPL_2_N', '$EMPL_2_GS','$OTHER_OWN_RENT','$OTHER_OWN_RENT_D','$OTHER_OWN_RENT_V','$OTHER_OWN_RENT_AM','$OTHER_OWN_RENT_MP','$OTHER_CC_REER', '$OTHER_CC_REER_D','$OTHER_CC_REER_V','$OTHER_CC_REER_AM','$OTHER_CC_REER_MP','$OTHER_INV_CAR','$OTHER_INV_CAR_D','$OTHER_INV_CAR_V', '$OTHER_INV_CAR_AM','$OTHER_INV_CAR_MP','$OTHER_OTHER_L','$OTHER_OTHER_L_D','$OTHER_OTHER_L_V','$OTHER_OTHER_L_AM','$OTHER_OTHER_L_MP', '$EMAIL','$ACCEPT','$STATUS','$DATE')");
  5. cause it is not me that will check every day when the update is done to check the products that were inserted and the one's that are missing...
  6. ? if it is in the catalogue DB set it to 1 if not set it to 0
  7. hey guys how would i be able to take a table and check in anoter table if it is there ..if not put like (o) if it is (1).. this checks the DB for the product SELECT TbItemInventory.Name, xcart_products.productcode, TbItemInventory.QuantityOnHand, xcart_products.avail,xcart_products.productid,TbItemInventory.ID,TbItemInventory.xcart FROM TbItemInventory, xcart_products WHERE ( TbItemInventory.Name = xcart_products.productcode )
  8. nice .i needed to have numbers in DB or that error would happend.i will change it .thx for the help
  9. hey guys i'm trying out this ajax rating script and i get this division by zero: Warning: Division by zero in /home/open2sha/public_html/Rate/index.php on line 37 <?php // very quick & dirty code $sql = mysql_query("SELECT * FROM tut_starRating"); $rows = mysql_num_rows($sql); if ($rows == 0) { echo "no rows found"; } else { while($row = mysql_fetch_array($sql)) { $tmp_rating = $row['rating'] / $row['votes']; $rating = round(($tmp_rating*2), 0)/2; // round up or down to nearest half print("<li><div class='rating' id='rating_".$row['articleId']."'>".$rating."</div><div id='starRatingFeedback_".$row['articleId']."'></div></li>"); } } ?> </ol>
  10. Hey guys on some site i see when you click a link it opens a new page.but on top of that page there is a bar that has like return to site or rate site... so im guessing the bottom part is an iframe (site cliked on) how can i set up the top bar?
  11. i think i got it.. SELECT TbItemInventory. * FROM TbItemInventory LEFT JOIN xcart_products ON TbItemInventory.Name = xcart_products.productcode WHERE xcart_products.productcode IS NULL LIMIT 0 , 30 seems to be working good
  12. hey guys i need to compare 2 databases and see what is missing in one? whats in db1 missing in db2... how would this go about?with a search query?
  13. i have it as varchar.. if i change it will i loose what i have in there?
  14. hey guys i have a car dealer script and i want to make the interface look better.. so i want to put icons(door locks-ac-auto-manu-4 door..) my issue is the if.. so im guessing <? if ( $row3['Door_locks'] == 1 ) { echo "<img src="icons/Doors.png" width="32" height="32" border="0">";} ?>
  15. Hey guys in my database i have a colum Retail_price in it the numbers are seperated by, so :9,245$ so my query $q4 ="SELECT sum( Retail_price ) AS TotalCount FROM cars"; $res4 = mysql_query($q4); $row4 = mysql_fetch_assoc($res4) works but only counts the nember before , ....??
  16. techker

    cron job confirm

    ohhh i need it every hour
  17. techker

    cron job confirm

    Hey guys i just want to know if i set this up good.. 59 1 * * * /httpdocs/updateDB_QTY.php so i want it to start every 1h59 minutes..
  18. ok this is what i got for the query $query2 = "SELECT TbItemInventory.Name, xcart_products.productcode FROM TbItemInventory, xcart_products WHERE ( TbItemInventory.Name = xcart_products.productcode ) LIMIT 0 , 50"; <? while($row1 = mysql_fetch_array($result6)){ echo $row1['Name']. " - ". $row1["productcode"]. " - ".$row1["QuantatyOnHand"]; echo "<br />"; } ?> no this works.now how can i insert a update? tryed this with nosuccess.. $sql4 = "UPDATE xcart_products SET avail='$QTY' WHERE productcode='$Name' "; $result4 = mysql_query($sql4)or die(mysql_connect());
  19. with a obdc connector. its fast and free http://www.bullzip.com/download.php so i dump it in all the info.but i need to update the xcart product table
  20. Hey guys i need to check a databse and update another Db? can i do this in one script? i have a databse(tblinventory) that i sync(OBDC) with specific fields(price-QTY-SalesPrice..) and i have a cart(Xcart)that i want to update the inventory QTY and price. so bacsicly i want to check my tbl inventory and sync it with my xcart procuct tbl.
  21. techker

    my vps has asp?

    no sorry.i click on it.
  22. techker

    my vps has asp?

    cold be.copy of the plesk page Plesk ships with several test pages, showing script version, testing database connections, sending mail, etc. Click on icon to see test pages for different scripts: ASP -SSI- PHP -ColdFusion- Perl Python -FastCGI -Miva
×
×
  • 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.