Jump to content

kevincro

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kevincro's Achievements

Member

Member (2/5)

0

Reputation

  1. I might not be understanding what you are needing, but you might try saving the Type_id from table one in a variable and then using that variable in a "where" clause in a second query.
  2. I've been trying to use the $ sign within php code for its literal meaning. However, I can't figure out how to keep PHP from trying to use it as a variable. I've tried several things with to no avail.
  3. I think I posted this in the wrong place, this forum has changed since the last time I visited. My apologies.
  4. I've been trying to use the $ sign in php for it's literal dollar meaning. I've tried several things to keep PHP from trying to associate it with a variable. I'm not having any luck.
  5. The odd thing about this error is it happens randomly. No one application on my website consistently gives this error. I'll go through and optimize my site as best I can. Hopefully that will take care of this. Thanks so much.
  6. Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 4864 bytes) in public_html/maincore.php on line 314 I'm not sure what this error message means. Please help. Thank you Kevin
  7. I get the following error which points to the following line of code. Any ideas? Warning: preg_replace() [function.preg-replace]: Compilation failed: reference to non-existent subpattern at offset 5 in public_html/view.php on line 61 foreach($card as $key=>$cards) $hand = preg_replace($key, $smiley_img, $hand);
  8. I've looked all over their support site to no avail.
  9. My first question is, has anyone used a PHP/SWF charts before, and if so have you had any problems with it. My second question is, is there anything wrong with the following code. I'm trying to set up an array that will populate a flash chart with database info. $data_key = $_GET['item_id']; include "charts.php"; //start the PHP multi-dimensional array and create the region titles $chart [ 'chart_data' ][ 0 ][ 0 ] = ""; $chart [ 'chart_data' ][ 1 ][ 0 ] = "Number $data_key "; require "db_connect.php"; //get the smallest year to determine which year to start the chart with $result = mysql_query("SELECT MIN(game) AS MinGame FROM bankroll WHERE number = '$data_key'"); $MinGame = mysql_result ( $result, 0, "MinGame" ); //get all the data in the Growth table $result = mysql_query ("SELECT * FROM bankroll WHERE number = '$data_key'"); //extract the data from the query result one row at a time for ( $i=0; $i < mysql_num_rows($result); $i++ ) { //determine which row in the PHP array the current data belongs to switch ( mysql_result ( $result, $i, "number" ) ) { case " Number $data_Key ": $row = 1; break; } //determine which column in the PHP array the current data belongs to $col = mysql_result ( $result, $i, "game") - $MinGame + 1; //populate the PHP array with the game title $chart [ 'chart_data' ][ 0 ][ $col ] = mysql_result ( $result, $i, "game"); //populate the PHP array with the bank data $chart [ 'chart_data' ][ $row ][ $col ] = mysql_result ( $result, $i, "Bank"); }
  10. Okay, thanks I just wanted to know if it were possible before I started looking through Flash manuals.
  11. My vagueness is really more ignorance than anything else. In the program I'm using I have to enter the url associated with each button. Then the program outputs an swf file and an html file. The HTML contains the following code: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="126" height="207"> <param name="BGCOLOR" value="#61678"> <param name=movie value="usermenua.swf"> <param name=quality value=high> <embed src="usermenua.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="126" height="207" bgcolor="#61678"> </embed> </object> I assume this code points the browser to the swf file. I don't see any way of including the php variable into the links in the flash menu.
  12. I don't mean to hijack this thread but could you explain how to sanitize the data?
  13. I'm not really sure what all you are trying to do. I might need some more info, but the following is a select query that will return all the data associated with $id. <? //The following pulls the variable from the url of the second page. $id = $_GET['id']; //The following begins the select query $result = mysql_query("SELECT * FROM (your db table name) WHERE (column name containing $id) = '$id'"); while ($row = mysql_fetch_array($result)){ //the following sets up the table that will display the data. The while loop will return all rows that have the //same $id. Note that you should the name of the column where it says column name. You can display as //many columns as the db table contains. echo "<TR>"; echo "<TD>$row['column name']</TD>"; echo "<TD>$row['column name']</TD>"; echo "<TD>$row['column name']</TD>"; echo "<TD>$row['column name']</TD>"; echo "</TR>"; } ?>
  14. Honestly I don't know much at all about Flash. I bought a program that you can use button templates to make the menu. I had to upload an .swf file and an html file. I'm not sure if this answers your question though.
  15. $result50 = mysql_query("SELECT MAX(event_tail) FROM events WHERE client_id = '$client_id'") ; $row50 = mysql_fetch_assoc($result50); $a= $row50['MAX(event_tail)']; $a should now contain the value you are looking for
×
×
  • 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.