1,257 Posted Topics
Re: 1) what are columns name of both tables? 2) Is you table 2 holding value as 'fee 011' (will it always have fee prefix in all records) or table 2 is holding 011, 012 like that | |
Re: You are facing the problem due to your wrong design. I will suggest you to change the design, otherwise you will end up with un managable system. Subjects { subject_id (PK), subject_name & class_id (FK).} Marks { mark_id, student_id(FK), exam_id (FK),[B] subject_id(fk), marks_obtained[/B]} | |
Re: Here i have added 2 lines is begining to check error I have commented if check=0 to see whether result comes or not try following code [CODE]<?php error_reporting(E_ALL); ini_set("display_errors", 1); // Before this, I have connected to the database (succesful) and has selected the database too. $checkrow_query = "SELECT * … | |
Re: [url]http://www.youtube.com/watch?v=v8HoVdenZFM&feature=youtube_gdata[/url] | |
Re: [url]http://www.w3schools.com/php/func_filesystem_fgetcsv.asp[/url] | |
Re: [url]http://msdn.microsoft.com/en-us/library/ms189799.aspx[/url] | |
Re: I think you must save html code for each element in database. For example you keep few default input element in database say (id, html_code) Populate all id with html_code on left side as sample, so when some one click any id button. copy corresponding code to your new design … | |
Re: Its depends on your database structure, php has noting to do much about it. | |
Re: remove this line from loginform.inc, you have already included core.inc.php. [CODE]require 'core.inc.php';[/CODE] or use [CODE]require_once('core.inc.php');[/CODE] | |
Re: php.ini is to be modified for limit of file size. html parameter will not help | |
Re: download php-tcpdf libraries, it has feature to build barbodes with pdf report. | |
Re: you must give another name and ID to inner test button, LIKE test1, test2 etc | |
Re: how is your structure 1) is there any possibility that an employee transacted more than once in same date or 2)for one date employee will have only one transaction select your case 1 or 2 | |
Re: batchmaster batchid, batchname 1, batch1 2, batch2 3, batch3 studentmaster studid,studname,batchid, emailid 1, abc, 1, [email]ab@yahoo.com[/email] 2, pqr, 1, [email]pr@yahoo.com[/email] 3, xyz, 1, [email]xz@gmai.com[/email] 4, rms, 2, [email]rms@gmail.com[/email] 5, opm, 2, [email]pmo@gmail.com[/email] 6, abc, 2, [email]bc@yahoo.com[/email] In any table to avoid chaos or confusion we shold always select one primary … | |
Re: actually your format is yyyy-dd-mm so change your strftime like [CODE]strftime("%Y-%d-%m", $datevariable);" [/CODE] or change your date picker setting to yyyy-mm-dd, then you can directly insert date variable without strftime. | |
Re: I assume that you have phpmyadmin installed in both your local server and live server. So open phpmyadmin, select database, export select tables and all parameters you want export to sql file format now you have your sql file. Now open phpmyadmin of live server create database if it is … | |
Re: I think your post is not proper so write following code at line 15, and check what all is posted to your script. Also copy intialise $date directly without using var_dump [CODE]echo "<pre>"; print_r($_POST); echo "</pre>"; $date =$_POST['date']; echo $date; [/CODE] | |
Re: echo query before executing (as i did it below), then run page in browser, copy query and run in phpmyadmin, see where query updates account. I think your account number is not matching. [CODE]<?php $connect=mysql_connect('localhost','root',''); mysql_select_db('bank',$connect); if(isset($_POST['account_number'])) $account_number=$_POST['account_number']; else $account_number=''; $query = "UPDATE account_details SET approved_status='1' WHERE account_number='$account_number'"; echo $query."<br>"; … | |
Re: implode works on array not on string so you need to replace spaces with hyphen. I am assuming only one space between all ids [CODE]$id1 = str_replace(" ","-", $id);[/CODE] | |
Re: 1) Heredoc may not work (I am not sure) with loops. so I removed heredoc and used simple php string. 2) For FOR loop you should use another iterator, like is repalced i with j, because your while loop is already using i . [CODE] <? $conn = mysql_connect("mysql-g35a.mysqldbserver.com", "goodgu", … | |
Re: [CODE]<html> <body> <script type=text/javascript> var n=0; document.write("<table border=1 width=100px>"); while(n<=10) { document.write("<tr><td align='center'>"+n); document.write("</td></tr>") n++; } document.write("</table>"); </script> </body> </html>[/CODE] | |
Re: 1) Here in insert query \" double quote is not allowed you must use single quote 2) no need to check record exist or not, just use [COLOR="Green"]on duplicate key[/COLOR]. [COLOR="Red"](Note: on duplicate key works only in MYSQL, and you must define primary key or unique for the table)[/COLOR] [CODE]$res=mysql_query("insert … | |
Re: you can create view where you can calculate age using above formula and other required columns, Then you many use your view everywhere, now you just have to use column name age, no need to give formula again. | |
Re: [CODE]<html> <script language="javascript"> function validate(dt1,dt2) { var jdt1=Date.parse('20 Aug 2000 '+dt1); var jdt2=Date.parse('20 Aug 2000 '+dt2); /* if(jdt1=='NaN') { alert('invalid start time'); return false; } if(jdt2=='NaN') { alert('invalid end time'); return false; }*/ if (jdt1>jdt2) { alert('start is greater'); } else { alert('start is less equal'); } } </script> <body> … | |
Re: for MENU you may user superfish. for tabs you may use JQUERY-UI-TABS | |
Re: [CODE]SELECT a.studId, a.classId, a.yearClassTaken as year, a.grade, FROM `tblstudent_grades` a inner join (SELECT studId, classId, max(yearClassTaken) as year, FROM `tblstudent_grades` group by studId,classId) b on a.studid=b.studid and a.classid=b.classid and a.yearClassTaken =b.year[/CODE] | |
Re: <?PHP tag is not required at line 18 in your file, you are already in php tag. [CODE] <?PHP . . . . . // Count table rows $count=mysql_num_rows($result); /////*************<?php THIS TAG IS NOT REQUIRED*************** while($rows=mysql_fetch_array($result)) { ?> <tr> <td align="center" bgcolor="#FFFFFF"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="y" /></td> . . . … | |
Re: I would go for separte relational table for expertise and approches. Otherwise you have to struggle a lot to save, extract, report, query data in current case. Also if your CEO ask to allow 5 expertise and 3 approches then all effort are to be made again. | |
Re: too much detailed information is posted. | |
Re: You are trying to mix two different areas into one. Its true that you may store files in binary format in databases, but that feature is rarerly used. Better option is you may keep your files on server and save address (path) of that file in database column. Access restriction … | |
Re: IF you have php installed on that server you can do this thing by using php script (need to be developed according to your requirements). | |
Re: 1) keep process page separte from user form. 2) use cookies to ignore execution of process code twice. | |
Re: [CODE]$test2=$test1[/CODE] | |
Re: Here is your query [CODE]select ESN , Supplier, RType , WarrantyPeriod , TodaysDate , Returndate , Receivedate , DATEDIFF(day, case when Supplier ='AC8' OR Supplier ='BEI'THEN returndate ELSE RECEIVEDATE END, todaysdate) TOTALDAYS, CASE WHEN DATEDIFF(day, case when Supplier ='AC8' OR Supplier ='BEI'THEN returndate ELSE RECEIVEDATE END, todaysdate)<WarrantyPeriod THEN 'YES' else … | |
Re: what is the source type, is it php or any other process page? I have done using php-jquery and post method [CODE] <?php if(trim($_POST['type'])=='batch') { //you may user $_POST['batchid'] variable to filter result //onthe basis of condtion you can echo your select element here echo "<select>"; echo "<option value=''>--select-</option>"; echo … | |
Re: [CODE] select '03-01-2011 to 08-03-2011' AS Year, OrderDetails.ProductCode AS ProductCode, OrderDetails.ProductName AS ProductName, Count(distinct OrderDetails.OrderID) As Orders, sum( OrderDetails.qty) As total_qty, sum( OrderDetails.amount) As total_amount, FROM OrderDetails WITH(NOLOCK) INNER JOIN Orders WITH(NOLOCK) ON OrderDetails.OrderID = Orders.OrderID LEFT JOIN Products_Extended pe ON OrderDetails.ProductID = pe.ProductID WHERE Orders.OrderStatus = 'Shipped' Orders.OrderDate between … | |
Re: are you sure include_fns.php is in same folder as your source file. if not find proper path of that file. | |
Re: Your mistakes, 1) with case you can not write condition 2) ignore using single quotes when comparing numbers 3) $ sign is not applicable to pure javascript. use variables without $ sign [CODE]<html> <body> <script type="text/javascript"> var age = Number(prompt("Enter Your Age: ")); if(age>=1 && age<=8) { document.write('Paramihan ng Toys!'); … | |
Re: you forgot to give name and id to form. Here is proper code. [CODE]<form name='a' id='a' action="a.php" method="POST" onsubmit="return val();">[/CODE] | |
Re: Date is little complex thing to begin with. You are intialising Y to date and comparing with integer. So If you learning JS, then start with simple types. Use chrome, you may find javascript debugger in chrome tools. Reference [url]http://www.w3schools.com/js/default.asp[/url] | |
Re: if you are sure that value of $session_unitidgrouping will always like x,y,z where x y z are integers (not characters). I mean separted by comma, then you must use IN keyword, not LIKE. Here is your new query [CODE]$query="select meetings.meeting_date, meetings.unit_id as unitid from meetings where meetings.status_id = '20' and … | |
Re: one table, I hope you have unitmaster table. whose pk is related in parts table say unitid, because each part may be having differenct unit id Stock update may have one more problem If you allow user to change or delete record, that should also change stock levels | |
Re: follow this post I think you will get your answer [url]http://www.daniweb.com/web-development/php/threads/287110[/url] | |
Re: You can not embed php tag inside php code, so following is the correct line [CODE]print "<tr><td><font color=\"#0080FF\" face=\"sans-serif\" size=\"2\"><b>emp nbsp</b><input type='text' name='txt1' size='10' style=text-transform:uppercase maxlength='7' value=\"{$_POST[txt1]}\" ></font></td></tr>"; [/CODE] | |
Re: are you able to run page. If yes then you must view source and look where the quotes are misplaced. | |
![]() | Re: You will always find that username or userid or loginid are always unique for that particular website. If username of your site is not unique (I am sure it is unique) then then you should find another unique column to rate it distinctly. do not use [CODE] rated LIKE '%$_SESSION[username]%'[/CODE] … |
Re: I have added constraint at the end. [CODE] CREATE TABLE test( id INTEGER AUTO_INCREMENT, iduser INTEGER REFERENCES player(id) ON UPDATE CASCADE ON DELETE CASCADE, . . class CHAR(10) NOT NULL , . . PRIMARY KEY(id,iduser), FOREIGN KEY (iduser) REFERENCES user(idu), CONSTRAINT chk_class CHECK (class IN ('x1','x2','x3')) );[/CODE] |
The End.