Jump to content

harleydude

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by harleydude

  1. I have a table with some data like this: Type Null Default cpindex  int(6) No    cpid  int(3) No  0  cpcid  int(3) No  0  cpcust  varchar(30) No  0  cprsm  char(3) No    cpprice  float No  0  cpqty  int(9) No  0  cpdate  date No  0000-00-00  cpquote  int(3) No  0  Indexes: Keyname Type Cardinality Field cpindex  INDEX None  cpindex  cpid  cpcid  INDEX None  cpcid  cpid  INDEX None  cpid  very simple data table, now the users have populated it with various amounts of data where the application will set the date to the current date (date data was enterred:Y-m-d format). So we have loads of data in the table where common items may have multiple entries on different days (we won't talk about multiple entries on the same day... users, egads!!). Ok, so far so good. Now, what I need to do is look at this database and get all of the most recent entries, en mass. The criteria to get the recordset is: cpid - product id cpcid - customer id i need all records with the most recent date by product group. What is the most efficient method of doing this? (using the select max(cpdate), * from cptable where cpid= $val and cpcid = $cval does not work). Thanks guys.
  2. I am thinking thatthe blackberry is stripping alot of form and table tags out when they are displayed. i ahve a small form that I need our sales force to use, and I configured my blackberry to use IE emulation, allow tables, etc... but no matter what I do, the tables come out columnized. I have tried everything I can think of to set the column widths appropriatly, but nothing seems to work. Has anyone else had any issues with getting blackberry formatting to work correctly?
  3. Nevermind, I got it... the technique implied earlier works fine, there was an error in the code (DOH!!) Thanks for the help!!
  4. That helps but the chart is blank... I have an array ($dt) with the following data: [code] ** > y dataArray (     [0] => Array         (             [0] => 1.00             [1] => 1.00             [2] => 1.00             [3] => 1.00             [4] => 1.00         )     [1] => Array         (             [0] => 0             [1] => 0             [2] => 0             [3] => 1.50             [4] => 1.50         )     [2] => Array         (             [0] => 0             [1] => 2.47             [2] => 2.50             [3] => 2.51             [4] => 2.51         ) [/code] Here is what I have for each line of the graph: [code] $graph = new Graph(350,250,"auto");    $graph->SetScale("textlin"); for($i=0;$i<sizeof($dt);$i++){ $p="p".$i; $$p = new LinePlot($dt[$i]); // get list stored in $i position $graph->Add($$p); } [/code] image outputs empty indicating that jpgraph does not like the data. I have also tried this by setting $i=0 and commenting out the for loop with no success either. JPGraph does not like the $p="p".$i; varaible name. Can anyone offer help or ideas on how to fix the above code snippet?
  5. I am using JPGraph to create some basic line graphs. According to the spec's i have, there can be anywhere from 1 line to 10 lines on a graph at a time depending on the SQL criteria being passed. Now, in JPGraph, you define a line like this (truncated for simplicity): [code] // Create the first line $p1 = new LinePlot($datay1); $p1->SetColor("navy"); $graph->Add($p1); [/code] Note that the line is a standard variable name ($p1). To add another line you just rinse and repeat this code. NOW, since the number of lines is arbitrary, is there a way to pass a variable variable to the JPGraph and replace the $p1 with a more usable scoped variable? I was looking for something like: [code] for($i=0;$i<sizeof($chartarray);$i++){   $p=$("p".$i);   $$p = new LinePlot($chartarray[$i]); // get list stored in $i position   $$p->SetColor("navy");   $graph->Add($$p); } [/code] I just read some on variable variables but am not sure of how they work and this bit odf code is off the top of my head and is not tested. I will play with this some but need to know if the concept works and best way to impliment it. Thanks  in advance, HD
  6. sure, just be sure that the ssn field in the database is a character field or else passwords like '012345678' will come out as '12345678'. A simple validation sql will do the trick: select uid from users where uid = loginid and pw = loginpw If recordcount == 1 then they are good to go!!
  7. maybe I am missing something myself, but I cannot find where the $_POST['pass2'] is being defined at? More especially what control is named pass2?
  8. I hope that this is an easy one for you all. I have a list box that uses will refresh the screen as soon as a selection is selected. The page will refresh with the new data selected, but will loose focus. I would like to have this element retain focus after the data refresh event has finished. Is there any way to do this? I have been looking but cannot find the correct process or methods. Thank you in advance for your help on this.
  9. Thanks you for the help, but... This page is heavily PHP driven and I am unsure about how to impliment this, especially since the <BODY...> tag is within a template and used throughout the site. I should be able to use php logic to tell the page to use it or not, that is not the problem, what I need is information on using this function? Also, is this PHP safe? I may be totally offbase inthese questions, but this is an active production system and I need to be sure about changing any global setting. Thanks in advance for your help.
  10. I have a basic login form with a row of menu buttons at the top of the page, 2 text elements (login name and password) and a logon button. What I want to do is default the cursor (set focus) to the login name text box whenever the form is opened OR if the page is refreshed. How do I do this?
×
×
  • 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.