Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. I need to remove specific files in a directory Example: woman_loves_herself.wmv How can i do this with php
  2. Good design great background positioning Only one thing, look at all the large sites.....they are all clean looking, a black background doesnt look clean, gives a feeling of shadyness
  3. Your right. and i never claimed to know the workings. but compiling the program was work enough in itself.....thats what open source is for REMEMBER!.....allows ppl to build off other scripts to make new programs. But getting back to my original point, anyone wanting to really test if i can decrypt zend files can post an attachment and ill decrypt it........now thats impressive! Peace homie
  4. Sorry only read half you post before posting.. Try this, make logical sense but havent tested it: SELECT matchupID, COUNT Steelers FROM team2 GROUP BY Steelers
  5. A hack is anything thats modified from the original code. Zend is supposed to be this high powered security system.....BUT ITS NOT when even I - a lowly programmer can split its head....Yes i do feel cocky about this! YES. And to prove it to Im impressed, so stands to reason someone who CANT DECYPT ZEND will be impressed
  6. Count them: SELECT matchupID, COUNT Steelers FROM team2 GROUP BY matchupID
  7. OH SHIT!! youve found me out......ahhh dammit. Yes i stuck a few pieces of code together and claimed it as a mod. Still dosent mean i cant do it MUAHHAHAAHAH!!
  8. Is decrypting zend files illegal?? Isnt that what we do everyday when we hack into windows??.....my thoughts too Ive built a windows bat file that will decrypt zend files...pieced together from code at sourceforge.net. Post a encypted zend file and ill decrypt it (attachment) - just to prove it. Its interesting to know that im an unexperienced c++ programmer but still wss able to decypt zend
  9. INT is an intreger, meaning it will count up from 0. You will need at least two columns to cross refernce so you can split the output into days , hours second, etc... `date_content_added` DATETIME NOT NULL, `date_displayed_last` DATETIME Then use php to subtract the last view time with the intial date or whatever timeframe you want
  10. Forums update view counts every time a post is viewed If your creating a column for views: mysql_query("ALTER TABLE table_name ADD COLUMN views INT") or die(mysql_error()); If you look at the data size of this column after a few weeks youll find its very minimal.
  11. The email part. I want the script to send an email when the if clause has been reached. There have to be headers set but im not sure how to go about it
  12. A simple question...but ive never done any email scripts before... I want to email mysel when an {if} clause is reached: <?php ////Testing if (yes==yes){ Email stuff here }
  13. Sorry made typos in code: <?php // Make a MySQL Connection // Construct our join query $query = "SELECT table2.column, table1.column ". "FROM table1, table2 ". "WHERE table2.column = table1.column"; $result = mysql_query($query) or die(mysql_error()); // Print out the contents of each row into a table while($row = mysql_fetch_array($result)){ echo $row['column1']. " - ". $row['colum2']; echo "<br />"; } ?>
  14. Join the two tables like so: <?php // Make a MySQL Connection // Construct our join query $query = "SELECT table2.column, table2.column ". "FROM table1, table2 ". "WHERE table2.column = table2.column"; $result = mysql_query($query) or die(mysql_error()); // Print out the contents of each row into a table while($row = mysql_fetch_array($result)){ echo $row['column1']. " - ". $row['colum2']; echo "<br />"; } ?>
  15. You mean an INSERT, i dont know how to UPDATE using multi table queries mysql_query("INSERT INTO video (gallery_url2, channel_real) VALUES('".$row['gallery_url']."', '".$row['categories']."' ) ") or die(mysql_error());
  16. Im trying to join two tables and the WHERE statment is true for all rows but it inserts only some new values into the video table, i think theres an error with the "while" portion of the script. Does the while statement look at the first row of each table: <?php mysql_connect("localhost", "user", "pass") or die(mysql_error()); mysql_select_db("name") or die(mysql_error()); // Construct a join $query = "SELECT gallery_import.*, video.*". "FROM gallery_import, video ". "WHERE gallery_import.description = video.title"; //////////////////// $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $sql = "UPDATE video SET gallery_url2='".$row['gallery_url']."' "; mysql_query($sql) or die(mysql_error()); $sql = "UPDATE video SET channel_real='".$row['categories']."' "; mysql_query($sql) or die(mysql_error()); } ?> video table has columns "title", "channel_real", "gallery_url2" gallery_import table has columns "description", "gallery_url", "categories" So this is TRUE for all rows in the video table: "WHERE gallery_import.description = video.title"; But say row 5 in video is row 23 in gallery_import. Dont now if this is the reason
  17. Yes that worked thanks! but im still interested in finishing this script, itll be handy to have
  18. Like this??: $lines = file('file.txt'); foreach trim(($lines as $line)) { $e = explode('|', $line); $e[0] = mysql_real_escape_string($e[0]); $e[1] = mysql_real_escape_string($e[1]); $e[2] = mysql_real_escape_string($e[2]); $query .= "('NULL', '{$e[0]}', '{$e[1]}', '{$e[2]}', '0'),"; } $query = substr($query,0,-1); mysql_query($query) or die(mysql_error()." $query"); echo "done";
  19. got a small problem with this script, it works great but it imports a "return" space after the end of every line thus rendering it useless Example of import.txt: category 1|description 1| category url1 category 2|description 2| category url2 when you look at ... category url1 and category url2 it has white space after it, even though the import.txt doesnt have any whitespace afetr each line How can i get rid of this whitespace afer each line? <?php mysql_connect("localhost", "user", "Pass") or die(mysql_error()); mysql_select_db("name") or die(mysql_error()); $query = "INSERT INTO import VALUES "; $lines = file('file.txt'); foreach($lines as $line) { $e = explode('|', $line); $e[0] = mysql_real_escape_string($e[0]); $e[1] = mysql_real_escape_string($e[1]); $e[2] = mysql_real_escape_string($e[2]); $query .= "('NULL', '{$e[0]}', '{$e[1]}', '{$e[2]}', '0'),"; } $query = substr($query,0,-1); mysql_query($query) or die(mysql_error()." $query"); echo "done"; ?>
  20. solved! Just added counter variable to while loop: while($row = mysql_fetch_array( $result )) { $counter <= $row['id']; $sql = "UPDATE category SET id='".$counter."' WHERE name='".$row['name']."' "; mysql_query($sql) or die(mysql_error()); $counter = $counter + 1; } echo "done";
  21. Maybe this would work better: mysql_connect("localhost", "user", "Pass") or die(mysql_error()); mysql_select_db("name") or die(mysql_error()); $result = mysql_query("SELECT * FROM category ORDER BY name ASC") or die(mysql_error()); while($row = mysql_fetch_array( $result )) { $sql = "UPDATE channel SET id='NULL' WHERE name='".$row['name']."' "; mysql_query($sql) or die(mysql_error()); } echo "done"; ?> But i cant seem to get it to count up from 0, ive set id to NULL column "id" is the primary key with auto_increment and null = not null
  22. Yes. and also number them starting at 1: Example: column name | columnn sort_order (currently set to 0 for all rows, but for this example i will number them showing what it will look like afetr update) bananna | 2 carrot | 3 apple | 1
  23. I need to sort categories by names ascending as well as set a new value based on the name order table is "categories" columns are "sort_order" 1,2,3,4etc.... and "category_name" here what ive come up with but its not right....im stumped <?php mysql_connect("localhost", "user", "pass") or die(mysql_error()); mysql_select_db("name") or die(mysql_error()); $result = mysql_query("SELECT * FROM categories") or die(mysql_error()); $sql = "UPDATE categories SET sortorder = NULL WHERE category_name ORDER BY ASC ;"; mysql_query($sql) or die(mysql_error()); ?>
  24. im getting no where with this....keeps throwing errors.....i might just do it through phpmyadmin Thanks anyhows
  25. Tried it but it Didnt work: <ul id="list"> <script type="text/javascript"> //the <ul> element var list=document.getElementById('list'); //all items in an array var elements=list.a,b,c,d </script> <li>A</li> <li>E</li> <li>D</li> <li>C</li> <li>B</li> </ul>
×
×
  • 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.