Jump to content
xisto Community

suicide1405241470

Members
  • Content Count

    55
  • Joined

  • Last visited

Everything posted by suicide1405241470

  1. I have a database that will contain 43 tables (among others). For these particular tables, they will each contain the same type of information, each representing a particular week in the NASCAR season. I used the following script to create one table:DROP TABLE IF EXISTS gulfOwnerDriversWeek1;CREATE TABLE gulfOwnerDriversWeek1 (ownerIndex int primary key,driverIndex1 int,driverIndex2 int,driverIndex3 int,driverIndex4 int);This table represents a draft sheet for one particular week (Week 1) for a particular team. My first question is, should try to put all weeks (43 of them) into one database, or should I keep each week in its own table (seems to be the smartest method). The only way I know to create a table right now is either through the mysql command line or a simple script. To create every table I need for my league in this manner would be very difficult. Is there an easy way to create 43 identical tables where the only discrepency between the table names would be the number on the end: gulfOwnerDriversWeek'X'? I have lots of tables like this for stats & what not and can't bring myself to create every one separetly at the command line. Thanks.
  2. I'm using the following to retrieve data from stat_table<?php/* Include Files *********************/session_start(); include("database.php");include("login.php");/*************************************/echo "<table border=1>";$query = "SELECT STAT1 FROM stat_table WHERE GAME_ID=1 ORDER BY STAT1 DESC";$result = mysql_query($query) or die(mysql_error()); //runs the query$p=1;while($row=mysql_fetch_row($result)){$i=0;while ($i < mysql_num_fields($result)){$field_name=mysql_fetch_field($result, $i);echo "<tr><td>$p</td>" . "<td>" . $row[$i] . "</td></tr>";$i++;$p++;}}echo "</table>";?>This displays the following:1 yki 2 fy I also have user ID stored within stat_table, which corresponds to the user_id stored within the table user_table. I'm very new to php/mysql and I can't get my head around doing the following:Getting the user_id along with STAT1 from stat_table and then using the user_id to extract user_name from user_table and put it alongside the relevent STAT1 in the table above (the yki, fy bit).
  3. I exported an Access database to csv file, and then imported the csv file to mysql.Now I'm trying to use COUNT() on a field, but its returning the total number of records, which is not what I want. I know that COUNT() is supposed to count all records that arent Null, so I checked out my table in phpmyadmin and I realized that even though there are no values for some records they are not showing up as Null.What is the difference between a Null and a field that is just empty? Shouldn't it be the same? Is there a way to count the records, or do I need to change those values to Null?
  4. I am trying to run the following asp function:code:--------------------------------------------------------------------------------Private Function GetAbs(dThisDate, lPartID) sql_abs = "SELECT AbsCode FROM Absence WHERE AbsDate = '" & dThisDate & "' AND PartID = " & lPartID Set rs_abs = conn.Execute(sql_abs) GetAbs = rs_abs(0).Value Set rs_abs = NothingEnd Function--------------------------------------------------------------------------------It works fine if it finds a record but returns an error if it doesn't. How can I avoid this error?Thanks!
  5. I'm currently designing an Intranet but one section needs to provide a search on around 5000 documents (word and pdf). Rather than list them all on a page with links to the documents (take a long time to setup and maintain)I was hoping to include a search facility. This search would look at filenames within directorys and display a list of the files found. A user could then select the document they require to look atAny ideas how I might achieve this?Many thanks.
  6. I am in the middle of creating a little forums system, and all so far is going quite well. However I have come across a small problem;PHP:-------------------------------------------------------------------------------- $gather_forums_qry = "SELECT a.frm_id, a.frm_name, a.frm_description, count(distinct(b.fth_id)) ThreadCount, count(distinct(c.fpt_id)) PostCount, a.frm_enabled, IF( IFNULL( MAX( b.fth_dateposted), 0) > IFNULL( MAX( c.fpt_dateposted), 0), date_format( IFNULL( MAX( b.fth_dateposted), 0), '%d/%m/%Y %T'), date_format( IFNULL( MAX( c.fpt_dateposted), 0), '%d/%m/%Y %T')) AS topic_last_post, d.usr_id AS UserID, d.usr_name AS UserName FROM dm_forum a LEFT JOIN dm_forum_thread b ON ( a.frm_id = b.fth_forumid) LEFT JOIN dm_forum_post c ON ( b.fth_id = c.fpt_threadid) LEFT JOIN dm_users d ON ( d.usr_id = IF(IFNULL( b.fth_dateposted, 0) < IFNULL( c.fpt_dateposted, 0), b.fth_userid, c.fpt_userid)) WHERE a.frm_enabled = '1' GROUP BY a.frm_name";--------------------------------------------------------------------------------I am trying to get the username of the last user who posted. The above code gets the correct date/time of the last post, it just doesn't get the last username correctly. I know I am missing something, but can't see what.
  7. One of my MySQL tables has an ID column - it's a primary key with auto_increment. And it works. If I add six rows they number 1 to 6 nicely. But if I delete rows 4 to 6 then add a new row, it becomes row 7. And if I delete that it becomes row 8. How can I make it so the next auto_increment is the smallest possible? (i.e. 1,2,3,4,5,6 - I delete 4-6 and the next row inserted becomes 4)
  8. I'm trying to insert about 500 rows into mysql, but I keep getting errors. If I copy and paste too many (about 50) insert statements at a time I get errors sometimes. I sometimes even get errors but then the row is skipped so I don't know there was an error (I'm using linux and SSH). What's the best way to get my insert statements to put the data in MySQL? Is there anyway that I can have it tell me if there where any errors all the statements are executed?Thanks for your help.
  9. I want to enter times for running event performances (like 10:26.35 for a person's 2-mile time, for instance). I am using sql server 2000. This is an ongoing concern for me since I do a lot of work with running events. Can someone give me some direction as to how I can best deal with this?The datetime data types do a lot of converting to 'time-of-day' and that is not what I want. For instance, if I enter a 2-mile time of 10:26.35 (a pretty typical 2-mile time) my db converts it to 10:26:35 AM.If I use varchar data type there is a ton of code to write when I want to sort the data.Thanks!
  10. I currently have a 100mb mysql database with my host, but I've got to thinking - is this really enough?I have phpbb running, and most of my site is in the database - username, password, other personal info, and then I have a table with 100 columns to which users add stats for certain computer games and more.The whole database is at 121kb at the moment, and this is without any members (but with the large table described above).The thing is, if I want to upgrade to the highest package, all that is offered is 5x100mb databases, and I can't see how I could store the data I need in the different databases.Will this cause trouble for me in the future if (and hopefully when) my website grows a lot larger? I mean is 100mb big or small for a mysql database?
  11. I read:"TO embed a font for I.E use @fontface. The src url points to a specific version of the font that can be downloaded by site visitors"So I am told to convert fonts to this special format for this tag i need a prog. but it only works for I.E.Are programs out now to support this format in Mozilla based browsers or is there a different method there?
  12. Is there any way to adjust the opacity of an embedded "movie"? Same question for select lists in a form. Examples:<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab; ID=blah1 width=120 height=60><param name=movie value="http://forums.xisto.com/no_longer_exists/ name=quality value=high><param name=bgcolor value=#000000><embed src="http://forums.xisto.com/no_longer_exists/; quality=high bgcolor=#000000 width=120 height=60 type="application/x-shockwave-flash"></embed></object>And...<select name=lang><option value='en' selected>English<option value='sp'>Spanish</select>I got everything else to work except those two tiny bits. The embedded "movie" file was coded by my friend since I have no experience there. The opacity change is needed more witht the movie. Even if I could just change the color of the select box with CSS, that would be great--thanks
  13. Hi everyone, I have a problem. I have two images, and one has the 3px IE bug. Turning this to a block level element fixes it but then an image to the right disapears. Another fix I have tried is an IE hack with -3px margin which makes the bottom line up but then the top is off. Here is the CSS in question. code:--------------------------------------------------------------------------------#masthead { width:100%; background-color:#4F6DB1; background-image: url(../images/layout/blg_gradient.jpg); background-repeat:repeat-x;}#logo { position:relative; z-index:1; display:block;}#mastheadImages { position:absolute; top:17px; left:0; width:100%;}#mastheadImages img { margin-right:10px; float:right;}--------------------------------------------------------------------------------And a small chung of markup.code:--------------------------------------------------------------------------------<div id="masthead"> <a href="index.php"><img id="logo" src="../images/layout/blg_logo.gif" width="418" height="152" border="0" alt="The Beaches Living Guide" /></a> <div id="mastheadImages"><img src="../images/layout/blg_title_images.jpg" alt="photos" width="544" height="105" /> <div id="topSmallNav"><div><?=getPageLinks();?></div></div> </div>--------------------------------------------------------------------------------If I take the block out of #logo the image image blg_title_images shows up but blg_logo has a 3px space under it. If I leave block in the space goes away and so does blg_title_images. Sorry I don't really have a working example as I am using a hack to get around it right now, but it doesn't look perfect. Any ideas? Oh and should I even bother mentioning that it works fine in Fire Fox.
  14. Hi,is there somekind of CSS style i could apply for tables to have diferent colors in diferent lines??? Separated one by one?This way my tables will all have (for example) a red row, a yellow row, a red row, a yellow row, a red row, a yello row, etc...If not, what can i do to achieve this?
  15. OK - The first page (intro page) of my website uses an imagemap button to link to the menu page of the site (I use an embedded flash menu).This all works fine in Firefox, but when I use IE, clicking on the "Enter Site" button opens a new IE window for the menu page - even though I put _SELF in the imagemap link. In Firefox, the menu page loads into the same browser window, which is how it should be.Can anyone explain why this is happening? Thanks.
  16. I have cracked the Style setting for text in anchor tags (text-decoration:none) - but when I want to have an image as a link, I get the blue border around the image and a purple when visited.How do I get rid of the formatting around the image, just like I have for the formatting of the text?Many thanks!
  17. I have multiple links on my page, but a few of them are in a table with a dark background, while others are on a light background. I have them in css sheets, but I was wondering how you would go about creating them so that the link color, active link, and visited link are different for both of them?
  18. Hello,I'm hoping that someone can help me with what seems like a simple question. I'm creating a site that I'd like to design to accomodate different screen resolutions -- I'd like to do this by setting table heights using percentages. My first question is:Is there any drawback to setting heights using percentages? My second, question is:I notice that Dreamweaver MX inserts a <DOCTYPE> tag at the beginning of new files: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://forums.xisto.com/no_longer_exists/ notice that with the Doctype tag, my tables don't resize. If I delete it altogether, they do. I guess I need the doctype tag, though, since my page uses IFRAME. Is there an alternative <DOCTYPES> tag I can use? If I opt for strict compliance by deleting the Transitional bit, the tables still don't work. Can I delete the doctypes tag altogether? Please help! thank you.
  19. Hi guys,I am new to html coding. Currently I am developing a site but having trouble fixing some problems. Maybe what I all need is just a few words from an experienced HTML coder or someone having sound knowledge of HTML. The site I am building is a corporate site, which demands the layout to be neat. But since I am not well acquainted with HTML, at first I made it too clumsy- with lots of tables and nested tables. After some self-work, I decided to make it look better. Here I go to explain how I tried achieved this,I took a main table of width 780 pixels. I expanded the table with a few more rows. In the first row I just changed the bgcolor. On the second row, I tried to put a form with a box and a search button. In third row, I inserted 3 images. 2 images namely – ‘home’ and ‘contact us’ which I put on the right side of the row. The main logo goes on to the left side. Here i got a few questions. [1] To put all 3 images, do I have to split the 3rd row? In fact I did split the row earlier, into 3 columns, without being aware of the trouble they would raise later. When I first put each images into a separate column, they kept the required distance from each other. But as soon as I tried to insert some data into the next row, they all got dispersed. What I mean is they all got misplaced soon as I tried to insert some data into the next rows. Read on please for a better understanding of what I tried to do in the next rows. On the 4th row, I put a table with 5 column and 3 rows. Five column coz I want to leave the left most columns for a java scrip menu. The other 4 columns will contain 4 images as the heading image of their respective column body. The 1st row I used for text heading for each column, 2nd row for the images and 3rd row for each column bodies- simple text. So far this layout was okay. But once I tried to expand the column body, it had an affect on the 3 images I inserted on the previous row. As I told earlier, they all got misplaced. How to solve this problem? Someone suggested that I should maintain a basic design rule and that is not to split different rows of the same table differently i.e 1st row having 2 columns and 2nd row having 4 columns. [2] But my question is how do you people maintain different type of contents in different rows in the same table? [3] The same problem persisted when I tried to use this page as template and make more pages out of this template. Here, I would like to seek another tip. Which region would you suggest me to keep as an editable region? The nested table in row number 4? [4] For other pages, on the 4th row, what I all want is just a heading and a few hundred lines of text beneath it. Do you suggest me to remove the nested table for this simple page layout? How do I keep my menu then?
  20. Hello All,I am very new to this site, and even to web development.I was given a task to make a site using html(and anything I am intrested in). This site would have a common template along all the pages in it.Now what I want is, Is there any way to define a template using HTML.If yes how?If no, what is the other easiest option for it. I dont like to code the sanme stuff in all the pages. Is there any way of data reusability.I thought of some other way, like making a page with the template(that continues through all the pages in site) and calling that page in each and every page, I made that page, but I dont know how to call that page in all my pages,Could anybody help me?Thanks for your help.
  21. I have a cell in a table that has some images inside it. How can I make it so that when you mouse over the cell the border color of the image will change?
  22. Hi, I currently have a button on a web page (a sign in button) I just wondered is there any html code that I could add on to the end of the web page which would force the click, or mimic a user clicking on that sign in button. (yes I am writting an auto sign in thingy) in OO programming we use Button.click; to mimic this.. is there such thing in html? this is the code i get highlighted if i click on the sign in button at design time <input name=".save" type="submit" value="Sign In" class=buttonwhite></td> thanks
  23. hello! I have a table row, <tr>, in which i have 4 cells , <td>, in these cells i would like to have a text that starts exactly at the same position, hence i have a css that aligns the text td.top{padding-top:3px} , but this is not taken into account. each td is describes as follows <td class="top">, the text starts at different levels, depending on the amount of text.
  24. Hi, I am looking for a way to embed external rss/xml files into my html page, how/is this possible?
  25. take a look at this code <BODY bgcolor="#342c23"> <table width="570px" bgcolor="#83423c" align="center" height="500" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#324c23" align="center" height="54">Test 1</td> </tr> <tr> <td>Test2</td> </tr> <tr> <td>Test3</td> </tr> </table> </BODY> [code=auto:0] when the tag for the background color of the page is put in, it makes the top cell for the table appear slightly off. however when it's not in, the cell inside the table appears fine
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.