M.O.S. Studios
-
Posts
286 -
Joined
-
Last visited
Posts posted by M.O.S. Studios
-
-
how meny of each product they bought, how ever the count funcction just represents howmeny differn't products they bought
ie,
they bought
3 x apples
1 x orange
1 x juicer
incoice_pro would have 3 rows as follows:
ref - qty - name
1 3 apples
1 1 orange
1 1 juicer
the total would come out like this:
client_name invoice_number Complete count(*)
peter griffin 1 true 3
p.s. can mysql do the math of how meny total products?
-
hey guys,
im trying to send a my sql query that return information about an invoice and return a row count as a column,
table format is
invoices:
client_name - invoice_number - [...] - `complete`
invoice_prod
ref - qty [...]
soo if invoice_number has 3 rows where ref = invoice_number the db will ander this
client_name invoice_number Complete count(*)
peter griffin 1 true 3
im not sure whats wrong with my code, any advice helps
SELECT `invoice_number`, `complete`, `invoice_prod`.count(*) FROM `invoices`, `invoice_prod` WHERE `invoices`.`index` = `invoice_prod`.`ref` LIMIT 0 , 30
-
i do, its filed in with php,
however i fixed it by doing this
<input type="password" name="pass" autocomplete="off" /> <input type="password" name="pass_confirm" autocomplete="off" />
-
Hey guys,
I have a section of my website where users can alter their information, i ask the user to type their password twice to make sure their is no typos within it.
I have a problem when i reload the page after the user submits it.
for some reason FF auto changes the first password field to match the 2nd password field(even though they have different names), is their any html code that will turn this off
thanks in advance
-
i put an onload comment in the body tag, and called this function
function setdefaults(){ ChangeDropdowns(document.userprofileform.ship_con.value,'ship_prov','ship_post1','ship_post2','ship_zip'); document.userprofileform.ship_prov.selectedIndex = 3; }
-
hey guys
i use the script below to dynamicly fill in a select table, i want to mae the 3rd option (addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1')) the default selected when the script add it
any ideas?
function ClearOptionsFast(id) { var selectObj = document.getElementById(id); var selectParentNode = selectObj.parentNode; var newSelectObj = selectObj.cloneNode(false); // Make a shallow copy selectParentNode.replaceChild(newSelectObj, selectObj); return newSelectObj; } function addOption(selectbox,text,value) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); } function ChangeDropdowns(value,item_id){ if(value=='CANADA/1/1'){ addOption(document.userprofileform.getElementByName(item_id),'Northwest Territories', 'Nt/1') addOption(document.userprofileform.getElementByName(item_id),'Newfoundland and Labrador', 'Nl/1') addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1') addOption(document.userprofileform.getElementByName(item_id),'British Columbia', 'Bc/1') addOption(document.userprofileform.getElementByName(item_id),'Manitoba', 'Mb/1') addOption(document.userprofileform.getElementByName(item_id),'Alberta', 'Ab/1') }
-
as always the phpfreak fourms are a life saver,
worked like a charm thanks guys.
-
im sorry, i posted late last night,
the var name is item_id,
when i use the ChangeDropdowns(value,item_id) function,
for example, this code works
function ChangeDropdowns(value,item_id){ if(value=='CANADA/1/1'){ addOption(document.userprofileform.ship_pro,'Northwest Territories', 'Nt/1') }}
but i want to replace ship_pro with the variable 'item_id' so that i can control where it put that information with one script. instead of having two scripts that have the exactly the same info just a differn't location
-
hey guys,
I have drop down menu called country shipping, and thoe other called country billing.
basicly when come one chooses the country the drop down under it fills with states or provinces
here is the function i use
function ClearOptionsFast(id) { var selectObj = document.getElementById(id); var selectParentNode = selectObj.parentNode; var newSelectObj = selectObj.cloneNode(false); // Make a shallow copy selectParentNode.replaceChild(newSelectObj, selectObj); return newSelectObj; } function addOption(selectbox,text,value) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); } function ChangeDropdowns(value,item_id){ if(value=='CANADA/1/1'){ addOption(document.userprofileform.getElementByName(item_id),'Northwest Territories', 'Nt/1') addOption(document.userprofileform.getElementByName(item_id),'Newfoundland and Labrador', 'Nl/1') addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1') addOption(document.userprofileform.getElementByName(item_id),'British Columbia', 'Bc/1') addOption(document.userprofileform.getElementByName(item_id),'Manitoba', 'Mb/1') addOption(document.userprofileform.getElementByName(item_id),'Alberta', 'Ab/1') }
here is how its called
<select name="ship_con" onChange="ClearOptionsFast('ship_pro'),ChangeDropdowns(this.value,'ship_pro');"> <option value="CANADA/1/1" SELECTED>CANADA</option> </select>
now when i replace the variable 'id_value' with the name of the drop down it works fine, but when i replace it with the variable, it dosn't work, any one see the prob?? thanks in advanced
-
thanks thats what i needed to know
-
ok guys i got it done, thatnks for all your help
here is the code i did
java header
<script language="JavaScript" type="text/javascript"> function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function rate_data(id){ xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support AJAX!"); return; } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete"){ document.getElementById('rate-responce').innerHTML=xmlhttp.responseText; } } var url="send.php"; url=url+"?score="+id; xmlhttp.open("GET",url,true); xmlhttp.send(null); } </script>
then for each star icon i did this
<li><a href="#" onclick="rate_data(1);" title="1 out of 10" class="r1-unit rater" rel="nofollow">1</a></li>
thanks again for all the help
-
no, one all the comments are stored in one table regardless of what video they are for,
the other way each comment is put into a different table depending what video they are for.
how ever, you described the 1st way
-
Hey guys,
Im working on a site that will have streaming video, for each video their will be a ability to comment on it much like you tube.
I'm torn between two ways to build this, the final goal will be minimizing loading time and strain on the server.
option 1.
Each video have 2 tables, one for the video information, the other for its comments.
option 2.
all the coments are stored in one table with a reference number linking it to the video
any other sugestions are welcome,
any ideas?
thanks in advance
-
i'm thinking about using an iframe, i did some tests just a few mins ago and it looks like it will work, the only problem is that it will make it a lot easier for bots to attack my db that way.
i know zero Ajax, Do u guys know a tutorial I can look up that will show me what i will need to know on that subject?
or the name of the subject to google?
-
hey guys,
I'm working on a site that streams video content. i want to give the user the option to rate what he/she is watching.
I would like to make a button that opens an invisible window, or launches a php script, either way i would like it not to have to reload the entire page (so that the user doesn't have to reload the video)
any ideas?? thanks in advance!
-
i feel silly about that, i forgot to change the size in .center #content{}
how ever im still havinge problems with the scrollbars
-
hey guys,
I thought i was figuring out this css stuff but now one again i lernt i am not
2 problems:
1. the <div class='center' > tag stays the same size regarless of content, my content is not showing up even if i do overflow:visible;
2. my scroll bars are not change color at all, i know this never works on ff or safari, but it usaly does on ie
here is the css
<style type='text/css'> body{ border-width:0px; padding:0px; margin:0px; font-size:90%; width:100%; height:100%; scrollbar-base-color: #DA1B1B; scrollbar-arrow-color: #000000; scrollbar-3dlight-color: #ffffff; scrollbar-darkshadow-color: #2D2400; scrollbar-face-color: #DA1B1B; scrollbar-highlight-color: #DA1B1B; scrollbar-shadow-color: #ffffff; scrollbar-track-color: #DA1B1B; } .header{ width:640px; height:186px; clear:both; float:none; position:relative; } .center{ width:900px; height:100%; left: auto; clear:both; float:none; overflow:visible; position:relative; background: #000000 url(../../images/background/contentbg.png); background-repeat: repeat-y; } .center #content{ width:800px; height:760px; left: auto; clear:both; float:none; overflow:hidden; position:relative; text-align: left; } .center #menu{ height:75px; text-align: center; font-family: Comic Sans MS, san sarif, Arial; font-size: 30px; font-weight:heavy; font-color:#ffffff; } .center #menu a{color: #FFFFFF;} .center #menu a:hover{color: #DA1B1B;} .center #menu a:visited{color: #FFFFFF;} .center #menu a:active{color: #DA1B1B;} .footer{ width:900px; left: auto; clear:both; float:none; position:relative; } .bottom{ clear:both; width:100%; height:100%; float:left; position:relative; background: url(../../images/background/citywhite.png); background-repeat: repeat-x; } </style>
here is the html
<div class="bottom" align=center> <div class="header"><img src='images/background/logo.png'></div> <div class="center" align=center> <div id='menu'> <a href='index.php'>Home</a> <a href='index.php'>Merchandise</a> <a href='index.php?page=custom&file=2'>Media</a> <a href='index.php?page=custom&file=7'>Contact</a> </div> <div id='content'> <div class='video-title'> <acronym title="Red Avenger makes a new friend after escaping from the clutches of an angry hill billy."><p>A Taste For P.P.</p></acronym> <table width='100%'> <tr width='100%'> <td width='50%'> <div class='video-subtitle'>SEASON: 1</div> </td> <td width='50%'> <div class='video-subtitle'>EPISODE: 4</div> </td> </tr> </table> </div> <table width='100%'> <tr width='100%'> <td width='100%' align='center'> <div id="player">This text will be replaced</div> </td> </tr> </table> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> Playlist <center> <div class='video-playlist'> <img src='admin/upload/episodes/ra.gif'><br><a href='index.php?page=custom&file=2&epi=4&sea=1'>A Taste For P.P.'</a><br><br> <img src='admin/upload/episodes/Hero1.jpg'><br><a href='index.php?page=custom&file=2&epi=5&sea=1'>Hero For Hire I / V'</a><br><br> <img src='admin/upload/episodes/Hero2.jpg'><br><a href='index.php?page=custom&file=2&epi=6&sea=1'>Hero For Hire II / V'</a><br><br> <img src='admin/upload/episodes/Hero3.jpg'><br><a href='index.php?page=custom&file=2&epi=7&sea=1'>Hero For Hire III / V'</a><br><br> <img src='admin/upload/episodes/Hero4.jpg'><br><a href='index.php?page=custom&file=2&epi=8&sea=1'>Hero For Hire IV / V'</a><br><br> </div> </center> </div> </div> <div class="footer"></div> </div>
thanks in advance any ideas help
-
the css
.menu_ph { display:block; width:100%; border:0px;} .menu_rows { display:block; height:100%; white-space:nowrap; clear:left;} .menu_leftcell{ display:block; float:left; height:40px; width: 34%; white-space: normal; } .menu_cell { display:block; float:left; height:40px; width: 32%; white-space: normal; } .menu_cell #cellinfo { height:40px; line-height:40px; background:#000; text-align: center; font-family: Comic Sans MS, san sarif, Arial; font-size:30px; font-weight:heavy; font-color:#ffffff; }
<div class="menu_ph"> <div class="menu_rows"> <div class="menu_leftcell" style="text-align:right; "><img src='images/menu/left.png'></div> <div class="menu_cell" style="text-align:center; "><div id='cellinfo'><?php echo MENUS; ?></div></div> <div class="menu_cell" style="text-align:left; "><img src='images/menu/right.png'></div> </div> </div>
-
Hey guys,
I'm trying to make a menu that consists of 3 parts,
1 left side 20wx40h image
2.contents *800wx40 black square with the option inside
3.right side 20wx40h image
* 800 minimum but will expand if content expands..
and the whole thing to be centered,
i know how to do this in tables but I'm trying to embrase the future off css and it killing my brain
any ideas thanks in advance
the css
.menu_ph{ display:inline-table; width:800px; height:40px; background: transparent; text-align: center; } .menusides{ display:table-cell; width:20px; height:40px; } .menucontent{ display:table-cell; width:800px; height:40px; background:#000; text-align: center; font-family: Comic Sans MS, san sarif, Arial; font-size:30px; font-weight:heavy; font-color:#ffffff; } .menucontent a{ text-decoration: underline; }
the html
<div class='menu_ph'> <div class='menusides'><img src='images/menu/left.png'></div> <div class="menucontent"><?php echo MENUS; ?></div> <div class='menusides'><img src='images/menu/right.png'></div> </div>
-
awesome worked like a charm
-
i have a div that has a bgimage, i have another placed in that <div> and i want to align it along the bottom.
how ever no matter what i try the image stays along the top
css
.logo{ width:100%; height:255px; background:transparent url(../../images/background/citywhite.png); background-repeat: repeat-x; }
html
<div class='logo' align='center'><img src='images/background/logo.gif'></div>
any ideas???? thanks in advance
-
awesome,
i had to change it a bit to get it to work, but i got it,,, thanks for all the help,
this is the final code
css
module_s1 {margin:0px 0px 7px 0px; width:100%; background:url(../images/mainmenu_top.gif) no-repeat 0 0 #1e2224} .module_s1 div {background:url(../images/mainmenu_bottom.gif) no-repeat bottom left} .module_s1 div div {} .module_s1 div div div {padding:0px 0px 14px 0px; width:194px} .module_s1 div div div div {background:none; padding:0px 0px 0px 0px;} .module_s1 h3 {font:bold 17px Arial; color:#f2f4f7; padding:17px 0px 0px 27px; margin:0px 0px 12px 22px; background:url(../images/h3_bullet.gif) no-repeat left 17px} .module_s1 table {} .module_s1 td {padding:0px 0px 5px 0px;} .module_s1 td div {margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; background:none; /*width:138px !important*/} /*sub_main_menu indent*/ <!---.module_s1 a {background:url(../images/mainmenu_bullet.gif) no-repeat left top; padding:0px 0px 0px 32px; color:#ffffff !important; font:normal 13px Arial; text-decoration:underline; margin:0px 0px 0px 32px;} /* Item Of Menu Main */--> .module_s1 a {padding:0px 0px 0px 0px; color:#ffffff !important; font:normal 13px Arial; text-decoration:underline; margin:0px 0px 0px 0px;} /* Item Of Menu Main */ .module_s1 ul {margin: 10; padding: 0; list-style: none; } .module_s1 li {padding-left: 35px; background: url( ../images/mainmenu_bullet.gif ) 20px 2px no-repeat;} .module_s1 a:hover {text-decoration:none} .module_s1 img {width:0px; height:0px} .mainlevel {} a.mainlevel:visited {color:#2b465b;} a.mainlevel:hover {color:#2b465b;}
html
<div class="module_s1"><div><div><div> <h3>Clothing</h3> <ul> <li><a href='index.php?page=store&prod=12' class="mainlevel" >Trofeo track suit</a> </ul> </div> </div> </div> </div>
-
i tired that, but it is giving me the same problem, still dosn't line up the 2nd line to the first
-
sorry this is the html
<div class="module_s1"><div><div><div> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <h3>Clothing</h3> </td> </tr> <tr align='left'> <td align='left'><a href='index.php?page=store&prod=11' class="mainlevel" >Sereno suit w/embroidery</a> </td> </tr> </table> </div> </div> </div> </div>
[SOLVED] self join and count
in MySQL Help
Posted
thats awesome, thanks
worked liek a charm