-
Posts
812 -
Joined
-
Last visited
Everything posted by techker
-
hey guys i have a promo table with a filed that inserts the month (list box select).. i need to do a query to select the current month from the month table? i have tryed month() now()...
-
i figured out that the field was set to varchar not date..
-
is there a way to make it stay?cause the next day it disappears since it is only set to current day..
-
nice...i should of looked at select count...lol
-
Hey guys!! i have a quick question.i have a database that holds clients info name..number..payment method.. i need to count how many clients payed by visa so the tables name is new_members the row is called mode i got up to here but it always shows 0 SELECT COUNT( `mode` ) AS TotalNumber, SUM( `mode` ) AS TotalPrice FROM `new_members` WHERE `mode`= CHEQUE <?php echo $row3['TotalPrice'] ?> [code] i used a query from another page in my script..
-
its funny cause i noticed my charset on my page was at utf-8 thinking it would be good for french..so i set it to ISO-8859-1 and now it works. as for the mysql i will try diffrent ways..thx
-
hey guys wheat is the recommended carracter settings? cause i have tryed utf8 unicode,utf8_general_ciand i still cant see the special caracters?
-
ok so its to late to think it over.already lots of data in there. now i have notice that when i did this i added a line month. so is there a way to select all from fc were month =january and date is befor 01/01/2009
-
CREATE TABLE `fc` ( `id` int(4) NOT NULL auto_increment, `company` varchar(200) NOT NULL, `contact` varchar(20) NOT NULL, `number` varchar(20) NOT NULL, `units` varchar(20) NOT NULL, `PTO` varchar(20) NOT NULL, `store` varchar(20) NOT NULL, `date_issued` varchar(20) NOT NULL, `date_done` varchar(20) NOT NULL, `times` varchar(20) NOT NULL, `custom_rate` varchar(20) NOT NULL, `notes` varchar(200) NOT NULL, `travel_times` varchar(20) NOT NULL, `travel_charge` varchar(20) NOT NULL, `paid` varchar(30) NOT NULL, `month` varchar(25) NOT NULL, `year` varchar(20) NOT NULL, `client_id` varchar(20) NOT NULL, `service_call` varchar(100) NOT NULL, `done` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=164 DEFAULT CHARSET=latin1
-
well i do?i insert current date?but the format 01/01/2009
-
hey guy in my databse the date is as :04/06/2009 i have a querry that counts the number of installed units done SELECT COUNT( `units` ) AS TotalNumber, SUM( `units` ) AS Totalunits FROM `fc`" now i need to calcule the number of units done in a year and by months? i tryed this SELECT COUNT( `units` ) AS TotalNumber, SUM( `units` ) AS Totalunits FROM `fc` WHERE 'date_issued' >01 /01 /2009(afther this date) gives me NULL
-
ya i just convinced him to remove that in the databse.i think it is best to.thx!!
-
he needs to keep that info cause it is billed every month or year to the client.
-
hey guys i need to incript sensative info in a mysql databse. can somebody guide me in the write direction?
-
SSH tunel?can it be done by script or by software?think they will block it to?why do they put limits like that?
-
huh what?lol i cant connect to my server from an outside source.
-
hey guys i found out today that my hosting companie will not let outside mysql connections..only self server connection.. i was thinking of installing wamp on the pc and making it connect to the databse to get information.. is there a way to bypass that??
-
thx for the info.would there be any reason why it sometimes when you selectect multiple times or go thrue the categories it gets confused and does not show the client id anymore it likes looses it? and is it possible to multiply this script on one page?cause when i try it the refresh does all the copies..
-
interesting! $HTTP_GET_VARS was deprecated, so use $_GET instead cool understood your echo'ed $noticia2[category]'s should be replaced with {$noticia2['category']}, same with $noticia[pic] to {$noticia['pic']} why use { and why is it working?
-
hey guys i have this list box that when you select what categorie you want it refresh's the page to get the infor from a databse. now it works fine but somethims when you play arraound to mutch with the select box it does notretain the user id? <?php session_start(); if(!session_is_registered(myusername)){ header("location:login.php"); } $_id=$_POST['_id']; $client_id=$_GET['client_id']; require "config2.php"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>GRAPH</title> <SCRIPT language=JavaScript> function reload(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val ; } function reload3(form) { var val=form.cat.options[form.cat.options.selectedIndex].value; var val2=form.subcat.options[form.subcat.options.selectedIndex].value; self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val + '&cat3=' + val2 ; } </script> <script type="text/javascript"> function swapImage(){ var image = document.getElementById("imageToSwap"); var dropd = document.getElementById("subcat"); image.src = dropd.value; }; </script> </head> <body> <img id="imageToSwap" src="http://www.webworkout.info/Account/images/gymgraphb.jpg" /> <? $quer2=mysql_query("SELECT DISTINCT category FROM category order by category"); $cat=$HTTP_GET_VARS['cat']; // This line is added to take care if your global variable is off $c_id=$HTTP_GET_VARS['_id']; echo "<form method=post name=f1 action='dd3ck.php?client_id=$c_id'>"; ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['category']==@$cat){echo "<option selected value='$noticia2[category]'>$noticia2[category]</option>"."<BR>";} else{echo "<option value='$noticia2[category]'>$noticia2[category]</option>";} } echo "</select>"; if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT pic,id FROM $cat" ); }else{$quer=mysql_query("SELECT DISTINCT pic,id FROM $cat "); } echo "<select name='subcat'onChange='swapImage()' ><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { if($noticia['pic']==@$cat3){echo "<option selected value='$noticia[pic]'>$noticia[pic]</option>"."<BR>";} else{echo "<option value=/Account/PICS/$cat/$noticia[pic]>$noticia[pic]</option>";} } echo "</select>"; echo "<input type=hidden name='location' value='1'>"; echo "<input type=submit value='Submit'></form>"; ?> <label><br /> </label> <p> <p> </p> </body> </html> this part makes it always post the info var val=form.cat.options[form.cat.options.selectedIndex].value; self.location='ex9.php?_id=<? print"$client_id"?>&cat=' + val ; see any mistakes in the script???
-
i found this but i can't seem to modify it for me? function countdown($event,$month,$day,$year) { // subtract desired date from current date and give an answer in terms of days $remain = ceil((mktime(0,0,0,$month,$day,$year) - time()) / 86400); // show the number of days left if ($remain > 0) { print "<p><strong>$remain</strong> more sleeps until $event</p>"; } // if the event has arrived, say so! else { print "<p>$event has arrived!</p>"; } } // call the function countdown("Christmas Day", 12, 25, 2008);
-
hey guys im made a scanning system that when the member scans his id card it gets info from the databse nam and if there is a message in his file. i want to add an alert like there is x day's left to the end of your contract.. i have in the databse the created date and the end date. how can i calculate the remeinder of days ?
-
but you still need to login?but only once?