1,257 Posted Topics

Member Avatar for LRNPHP

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

Member Avatar for LRNPHP
0
163
Member Avatar for nadnakinam

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]}

Member Avatar for nadnakinam
0
156
Member Avatar for AbhishekBiswal

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 * …

Member Avatar for urtrivedi
0
197
Member Avatar for mwenyenia07
Member Avatar for binu_ds
Member Avatar for karthik_ppts
1
95
Member Avatar for folberlin
Member Avatar for adam_k
0
205
Member Avatar for vibhaJ

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 …

Member Avatar for vibhaJ
0
213
Member Avatar for mary_forum
Member Avatar for urtrivedi
0
231
Member Avatar for shujat132

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]

Member Avatar for shujat132
0
226
Member Avatar for manzoor.ilahi77
Member Avatar for sv3tli0
0
553
Member Avatar for rpv_sen

download php-tcpdf libraries, it has feature to build barbodes with pdf report.

Member Avatar for rpv_sen
0
312
Member Avatar for DILO3D
Member Avatar for ko ko
0
2K
Member Avatar for divyakprabh

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

Member Avatar for arshadshabbir
0
417
Member Avatar for vishalbhavsar
Re: Keys

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 …

Member Avatar for urtrivedi
0
146
Member Avatar for rakwel10

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.

Member Avatar for rakwel10
0
142
Member Avatar for dr.4030

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 …

Member Avatar for anand01
0
133
Member Avatar for heshanm

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]

Member Avatar for heshanm
0
185
Member Avatar for heshanm

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>"; …

Member Avatar for urtrivedi
0
177
Member Avatar for cliffcc

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]

Member Avatar for cliffcc
0
399
Member Avatar for SolidSora

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", …

Member Avatar for SolidSora
0
122
Member Avatar for choboja621

[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]

Member Avatar for urtrivedi
0
64
Member Avatar for erik216

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 …

Member Avatar for urtrivedi
0
142
Member Avatar for 54uydf
Member Avatar for harikrishna439

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.

Member Avatar for urtrivedi
0
95
Member Avatar for anandhikrishnan

[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> …

Member Avatar for anandhikrishnan
0
11K
Member Avatar for abelingaw
Member Avatar for abelingaw
0
106
Member Avatar for 54uydf

[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]

Member Avatar for urtrivedi
0
373
Member Avatar for ravi951

<?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> . . . …

Member Avatar for decade
0
111
Member Avatar for nschessnerd

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.

Member Avatar for debasisdas
0
110
Member Avatar for gonidelux
Member Avatar for harikrishna439

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 …

Member Avatar for urtrivedi
0
68
Member Avatar for 54uydf

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).

Member Avatar for linuxaomi
0
188
Member Avatar for doitnow1147

1) keep process page separte from user form. 2) use cookies to ignore execution of process code twice.

Member Avatar for vibhaJ
0
69
Member Avatar for jacksantho
Member Avatar for jovillanuev

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 …

Member Avatar for jovillanuev
0
121
Member Avatar for konradhoppe

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 …

Member Avatar for konradhoppe
0
201
Member Avatar for Mangesh G

[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 …

Member Avatar for urtrivedi
0
267
Member Avatar for surjeetk27

are you sure include_fns.php is in same folder as your source file. if not find proper path of that file.

Member Avatar for vibhaJ
0
124
Member Avatar for choboja621

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!'); …

Member Avatar for choboja621
0
101
Member Avatar for devindamenuka

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]

Member Avatar for TomH.PG
0
171
Member Avatar for fashxfreak
Member Avatar for G&G Designing
-1
116
Member Avatar for Olivis

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]

Member Avatar for urtrivedi
0
164
Member Avatar for Tunnleram

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 …

Member Avatar for urtrivedi
0
185
Member Avatar for mrhankey

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

Member Avatar for facarroll
0
1K
Member Avatar for k9huey

follow this post I think you will get your answer [url]http://www.daniweb.com/web-development/php/threads/287110[/url]

Member Avatar for k9huey
0
2K
Member Avatar for azhpool
Member Avatar for jacksantho

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]

Member Avatar for jacksantho
0
157
Member Avatar for facarroll

are you able to run page. If yes then you must view source and look where the quotes are misplaced.

Member Avatar for facarroll
0
123
Member Avatar for megachip04

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] …

Member Avatar for Stefano Mtangoo
0
249
Member Avatar for Deathmachine

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]

Member Avatar for Deathmachine
0
168

The End.