Jump to content

recset

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by recset

  1. Anyone have any ideas???
  2. Thanks for responding. However, that doesn't work, the following statement does work: [code]ALTER TABLE `wisdom_backup` ADD Cases2 varchar(30)[/code] However how do I get it to show a default value for the new column????
  3. I have an existing table, and I want to create a new column (with a default value), and have all of the records already in the table, have the new default value and column .... what SQL statement would accomplish this?
  4. How would I implement that into my current script? [code]mysql_select_db($database_vlot, $vlot); $query_ShowComments = "SELECT * FROM comments WHERE WISDOM_ID = (SELECT max(id) FROM wisdom)"; $ShowComments = mysql_query($query_ShowComments, $vlot) or die(mysql_error()); $row_ShowComments = mysql_fetch_assoc($ShowComments); $totalRows_ShowComments = mysql_num_rows($ShowComments);[/code] More or less, I do not need to code the 'show record count' in the above piece.
  5. I have two tables. (lets refer them as [b]Table A[/b] and [b]Table B[/b]) I am trying to show how many records are in [b]Table B[/b], based off of the record ID of [b]Table A[/b] (the Record ID of Table B will sort Table A) All of this has to appear in a Repeated Region. Here is what I have so far, please help: [code]mysql_select_db($database_vlot, $vlot); $query_ShowComments = "SELECT * FROM comments WHERE WISDOM_ID = (SELECT max(id) FROM wisdom)"; $ShowComments = mysql_query($query_ShowComments, $vlot) or die(mysql_error()); $row_ShowComments = mysql_fetch_assoc($ShowComments); $totalRows_ShowComments = mysql_num_rows($ShowComments);[/code] Thanks
  6. Wow, no comments huh?? I guess I must have a great site ... thanks  :o
  7. I've noticed that a lot of people have some extensions problems, if anyone needs some assistance or wants to know where to find some good dreamweaver extensions, message me.
  8. I have a new site, and I need some competent and helpful critiques. The site is on lyrics and quotes from pop/hip hop music artists. Also, any advice on how to generate traffic? exposure? [b][url=http://www.vacantlot.org]http://www.vacantlot.org[/url][/b] [img]http://www.vacantlot.org/elements/vlotlong.jpg[/img]
  9. Mewhocorrupts, I am actually using Win XP, i haven't really ventured out into the BSD realm. However, I will start looking for some bluetooth daemons for windows, thanks for the lead.
  10. [size=13pt]Does anyone know of any ideas of applying PHP scripts to utilize Bluetooth? Basically, I would like a script to call upon a Bluetooth Device, and transfer data from an SQL database to a Bluetooth device. I am lost, and do not know where to start. Thanks.[/size]
  11. Thanks for the ref. links, as for the logo, its just a silhouette image of someone holding a microphone. The site is designed for 1024x768, not 800x600
  12. I'd like some feedback on this site that I am about to revamp: [url=http://www.kingsofmusic.com]www.kingsofmusic.com[/url] The look I am going for is more of a magazine layout, does anyone have any ideas and/or reference sites.
  13. Mainewoods, I found the line: [code] $query_quotes = sprintf("SELECT * FROM wisdom_backup WHERE MAXIMID = %s ORDER BY AUTHOR ASC", $colname_quotes); [/code] The whole reason for this is to clear a url parameter that is added to the URL in the browser everytime a user 'votes' on a record.  Thus, if the user doesn't vote, then this line is irrelevant. But, when the user 'votes' it adds a URL parameter to the browser, so that if the user decides to vote on another record, it will count 2 votes (1 for the new vote hit, and 1 for the previous vote hit, because each url parameter is now in the url shown in the browser).  So essentially, after the user votes, I just want to clear the URL parameter. Does this make sense? Or am I over-thinking this?
  14. [b]Can anyone help out with this problem???? Please Help, thank you!!![/b]
  15. Sorry, about that. Ok, in the db is: [code]'wisdom2.php?MAXIMID=<?php echo $row_menu['ID']; ?>[/code] What I want the final result is to change the url of the browser window (when clicked) to: [code]'wisdom2.php?MAXIMID=<?php echo $row_menu['ID']; ?>[/code] the php tag would actually be a number of a recordset (depending on the row menu). Thus, that output would be something like: [code]'wisdom2.php?MAXIMID=5[/code]
  16. [b]Would anyone know of a php extension that creates a Fantasy Football league-type application? or A php extension that would handle stock/investment management?[/b]
  17. Actually its not a Select statement, its actually meant to be added as a url parameter after an existing link. For example on the page wisdom2.php, there is a link: [code]www.blanksite.com/URL PARAMETER here[/code] The URL PARAMETER, is brought from the database which i am trying to get working.
  18. I have the following problem, I am trying to store a php path in a SQL table (the field is a 'TEXT' field), db structure is latin2. Here is the short path that i am trying to store ([b]the code is actually a parameter for a link[/b]): [code]wisdom2.php?MAXIMID=<?php echo $row_menu['ID']; ?>[/code] However, I get this error message when I try to run a page that tries to extract the php code: [code]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? ORDER BY AUTHOR ASC' at line 1[/code] Now, if I were to simply write the same piece of code in a php page, it works fine, does anyone have an answer to why it is not working when the piece of code is stored in a SQL Database? (Pls don't respond w/ the obvious answer,  ;) I need it to be this way for a reason .... ) Thank you,
  19. I am trying to create a click counter for records in my database with the following code: [code] // *** Hits Counter *** $urlparam = "passit"; $ckrs = "quotes"; //used for identification if (!isset($HTTP_SERVER_VARS["QUERY_STRING"])) {   $HitLink = $HTTP_SERVER_VARS["PHP_SELF"] . "?" . $urlparam . "="; } else {   $HitLink = $HTTP_SERVER_VARS["PHP_SELF"] . "?" . $HTTP_SERVER_VARS["QUERY_STRING"] . "&" . $urlparam . "="; } if (isset($HTTP_GET_VARS[$urlparam])) {   $tableName = "wisdom_backup";   $fieldName = "ID";   $hitsfield = "Counter";   $urlfield = "PATH";   // Get the Hits number and update it.   $rsCon = "vlot";   $IdSource = "select * from " .  $tableName . " where " . $fieldName . " = " . $HTTP_GET_VARS[$urlparam] . "";   $rsId = mysql_query($IdSource, $$rsCon) or die(mysql_error());   $row_rsId = mysql_fetch_assoc($rsId);   $hiturl = $row_rsId[$urlfield];   $next = $row_rsId[$hitsfield] + 1;   $upd = "update " . $tableName . " set " . $hitsfield . " = " . $next . " where " . $fieldName . " = " . $HTTP_GET_VARS[$urlparam] . "";   $rsId = mysql_query($upd, $$rsCon) or die(mysql_error());   $rsId = null;   header("Location: " . $hiturl); } [/code] And this is the code for the actual link: [code] <a href="<?php echo $HitLink . $row_quotes["ID"] ?>">Download</a> [/code] Now, it does everything that I want it to do (counts hits everytime it is clicked) however, in the URL path,  it adds: [code]&passit=46[/code] the '46' refers to the record ID, now if a user keeps on clicking different record ID's, it will keep on adding the 'passit' url parameter, for example it would look like: [code] &passit=46&passit=22&passit=34&passit=5 [/code] And so on and so on. Is there a way to clear the url parameters once the link has been clicked, but still store the data that its supposed to store??
  20. That actually works, thanks for the help!
  21. I know this is a simple answer, and maybe because i have been glued to the computer is the reason why i can't see it, so here is the problem: $query_ldevices = "SELECT * FROM literary_devices_hold WHERE MAXIMID = ID"; -- I want to change 'ID' to $row_Recordset1['ID'] from a table called 'wisdom'; The purpose is that for the MAXIMID's in the literary_devices_hold table to only show information for each recordset in table ID, as long as the MAXIMID'S and ID's are identical. Can anyone help?
  22. Hi Jenk, I've tried to follow your method, but it conflicts with what I already have. I am confused, because the values of the array have to be selected through a form (they are not predefined). Thus, each record will have a different set of array values. I've been doing some research, and I believe that I just need to insert a piece of code in [b]here[/b]: [code]<select name="NOTES[HERE]" size="9" multiple="multiple" id="NOTES"> <?php do {  ?> <option value="<?php echo $row_literarydevices['LDEVICE']?>"<?php if (!(strcmp($row_literarydevices['LDEVICE'], $row_Recordset1['NOTES']))) {echo "selected=\"selected\"";} ?>><?php echo $row_literarydevices['LDEVICE']?></option> <?php } while ($row_literarydevices = mysql_fetch_assoc($literarydevices));   $rows = mysql_num_rows($literarydevices);   if($rows > 0) {       mysql_data_seek($literarydevices, 0);   $row_literarydevices = mysql_fetch_assoc($literarydevices);   } ?> </select>[/code] What variable should I put in 'here' so that it can store the values that the user selects? I do appreciate your help though, its just I always look for efficient ways to code. Thanks.
  23. Jenk, I think for the type of application that I am going for, I don't think it is necessary to create a new table for NOTES, so I was wondering how would the 'implode' and 'explode' function work? I would prefer to keep any additional codes for the array on the current page that I have now. [u][b]Add'tl Info[/b][/u] Also, I have the connections scripts in a seperate php file, so could you just guide me on how to do the array. Also the values for the array that I went to send into the database comes from a recordset from another table. Thanks.
  24. The database record just shows 'Array', but doesn't display what is in the array.
  25. I am trying to store multiple selections from a List Menu into one db field, but I get an error msg everytime I try. Here is a snippet of code: $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; -- this line is where the error is and <select name="NOTES[]" size="10" multiple="multiple" id="NOTES"> -- this is the line of my List menu <?php if (isset($_POST['NOTES'])) {   foreach ($_POST['NOTES'] as $value) {     echo "$value \n";   } } ?> -- This piece of code allows for the array Can any one assist with this problem please? Thanks
×
×
  • 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.