Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

bubblegum.anarchy's Achievements


Newbie (1/5)



  1. Hi premiso, Then shouldn't the string content in quotes appear in the HTML source as a tag? I actually do not want the username and password to appear in the source or be displayed in the browser so the code does what is required, i'm just trying to understand why for security reasons... <?php //username:password ?> makes more sense but does not work on the remote server (but works locally for some strange reason) in the particular API (AS3's URLRequest and URLLoader classes) used. premiso, would you agree that the username and password values are inaccessible and secure? Thank you for responding.
  2. Hi There, Why does the following PHP code display nothing in a browser? <?php print "<?php //username:password ?>"; ?>
  3. What is the value of $j ? - maybe use sizeof($snowdata) instead, depending on application. Consider something like this, for the fun factor: for ($i = 0; $i < sizeof($snowdata); $i++) { $query = "INSERT INTO weather VALUES ("; for ($n = 1; $n <= 14; $n++) $query .= "'{$snowdata[$i][$n]}',"; $db->query($query = substr($query, 0, strlen($query) - 1).")"); }
  4. Try: AND orders.OrderID IN (9,10,11)
  5. http://www.phpfreaks.com/forums/index.php/topic,125759.0.html
  6. I would like to know how since afaik an update can not be made based on a subset of the same table.
  7. $_POST[$value1] = isset($_POST[$value1]) && is_numeric($_POST[$value1]) ? "'".$_POST[$value1]."'" : "NULL"; $_POST[$value1] = isset($_POST[$value1]) && is_numeric($_POST[$value1]) ? "'".$_POST[$value1]."'" : "NULL"; settype($_POST[$id], "integer"); query = " UPDATE table SET column1 = {$_POST[$value1]}, column2 = {$_POST[$value2]} WHERE id = {$_POST[$id]}";
  8. Probably something like this: SELECT * FROM tablename WHERE ( hello = '1' OR hello2 = '1' ) AND id >= FLOOR( RAND( ) * ( SELECT MAX( id ) FROM tablename ) ) ORDER BY id ASC LIMIT 1
  9. This is what I do: SELECT * FROM repository ORDER BY sort_column IS NULL, sort_column
  10. Step through the max three rows returned from the following: SELECT tipType, group_concat(concat_ws('<BR />', concat('Tip Number: ', tip_num), concat('Tip Title: ', tip_title), concat('<IMG src="', tip_pic_top, '" />')) SEPARATOR '<BR />') AS tip_info FROM tipsntricks WHERE tipType IN ('exhaust', 'suspension', 'engine') Update the column names.
  11. Does the following produce the same results faster? SELECT sum(inquiries.iduser IS NOT NULL) AS icount, sum(response.iduser IS NOT NULL) AS rcount, ifnull(sum(ratings.total_value) / sum(ratings.total_votes), 0) AS avgscore FROM users LEFT JOIN inquires ON users.id = inquries.iduser LEFT JOIN responses ON users.id = responses.iduser LEFT JOIN ratings ON responses.idresponse = ratings.id WHERE users.id = '{$id}' Speed is probably more important when dealing with the dynamics of the Internet. Storage size is less dynamic and easier to control than bandwidth traffic.
  12. Also consider switching: if (array_key_exists('userid',$_SESSION)) { to: if (isset($_SESSION['userid'])) {
  13. A primary key identifies a record and indexing increases search times; primary keys are indexed.
  • 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.