No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
17 Posted Topics
Re: mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter and it doesn't really need to exist because it just returns the key names instead of Numeric keys and key names which happens in mysql_fetch_array.'Associative arrays' returned by mysql_fetch_assoc() are arrays with key names so , they're … | |
hi , I have database 'center' with huge data and wanted to create a dummy 'test' database for 'center' db with 1000 random data for testing purpose. I generated script to copy the db but the resulting 'test' db was tables without data. i need 1000 samples for all the … | |
Re: sample : [CODE]print("<?php $to_time=strtotime("2011-01-13 10:42:00"); $from_time=strtotime("2011-01-12 10:21:00"); echo round(abs($to_time - $from_time) / 60,2)." minute"; ?>");[/CODE] | |
Re: hi i have just worked with google apps column chart. from my reasearch on google apps.. the charts will be created based on google.visualization.DataTable,it cannot take the data by itself. get your php variable from javascript using json_encode. | |
[ATTACH]22040[/ATTACH] the following code displays output as in attachment.. it skips some of the value.. in the above output, am not getting group name for DTA. but if i add [CODE]where groupid='DTA' in query[/CODE], it displays groupname. what went wrong here? please help.. thanking in advance. [CODE] while($rowmain=mssql_fetch_array($resultmain)) { $course … | |
Re: try [CODE]$insertDate = date("Y-m-d",strtotime($date)) [/CODE] | |
Re: use PHP $_SESSION variable: set a variable in the session global array and use it by calling session_start() at the top of the script. example test1.php [CODE]session_start(); $_SESSION['value'] = 'This variable was set on page test1.'; echo '<a href="test2.php">Session testing</a>';[/CODE] test2.php [CODE]session_start(); echo $_SESSION['value'];[/CODE] | |
Re: check[URL="http://www.daniweb.com/web-development/php/threads/265323"] this[/URL]:) | |
Re: you cannot use 2 html form tags in same php file. alter your code to 1 html form.. and for action use : [CODE]<form id="form1" method="post" action=""> //eg: input type="submit" name="go" value="Go" onClick="form1.action=='<?=$url?>'" />[/CODE] | |
Re: hi i had same problem before and tried all the solution but not worked. finally i copied php folder from other pc (which its xampp works fine with php and mssql connection) and replaced it in current pc. its silly solution but i did as no other choice. | |
Re: [QUOTE=_8Bit;1623853]So what would: [CODE]$sql = 'SELECT key FROM table'; $result = mysql_query($sql);[/CODE] output if the key existed? and if it didn't exist?[/QUOTE] mysql_query returns resource on success and false on error. see this for more understanding.[URL="http://php.net/manual/en/function.mysql-query.php"]http://php.net/manual/en/function.mysql-query.php[/URL] | |
am getting [COLOR="Red"]Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent[/COLOR] while running the following code. please help to fix it.. thanks. <html> <!-- centermain.php is a frame, user redirected to frame if tried to access from url--> <SCRIPT LANGUAGE='javascript'>try { if (top == self) {top.location.href='centermain.php'; } … | |
the following code gives first date of week for the given date range. how to get week number from the date??? thanks. [CODE]<?php $start = $week = strtotime('2011-01-01'); $end = strtotime('2011-02-01'); while($week < $end) { echo date('Y-m-d',$week), PHP_EOL; //echo week num??? $week = strtotime("+1 week", $week); } ?>[/CODE] | |
the following gets first date of the week [CODE]DECLARE @Year SMALLINT = 2011 ;WITH cteSource(firstdate) AS ( SELECT CONVERT(varchar(50), DATEADD(DAY, 7 * v.Number, o.Origin), 101) AS firstdate FROM ( SELECT DATEADD(DAY, DATEDIFF(DAY, '18991230', STR(@Year, 4, 0) + '0101') / 7 * 7, '18991230') ) AS o(origin) INNER JOIN master.dbo.spt_values AS … | |
[CODE] set datefirst 6 datepart(wk,'2011-01-12') [/CODE] yields 2. I would like to derive 2011-01-08 from this number. please help.thanks in advance. | |
i need help in adding $data into datatable data.setvalue where will be used to generate column chart. first column = x-axis while the rest of the columns = elements. thanks in advance. [CODE] <?php $result=mssql_fetch_array($row); // $result already in correct structure. $data = json_encode($result); ?> <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> … | |
hi am beginner in php.. please help me.. rough explanation: user will select orgname and the following code will get the orgname and import data from mssql. i wanted to filter those data according to groupname and count number of users access to the system in month basis according to … |
The End.