If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > What i do ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-10, 04:45
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
What i do ?

I wanna ask that i have make a student fee collection using php/mysql

i want to ask that i have to collect each student fee using his code number(employe number) current month fee will be shown but how can i do that if a student doesn't submit his last month fee some thing like that he submit the fee of january then doesn't submit feburary and he is standing in the month of march how can it show that the student of code number 200 doesn't submit the fee of last month feburary ....
Reply With Quote
  #2 (permalink)  
Old 06-08-10, 08:32
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
So you're using MySQL, right?

Please provide table definition(s) (in the form of CREATE TABLE statements), some sample data (in the form of INSERT statements) and the output you'd like from your query.
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 06-09-10, 08:55
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
ok tell me this one query then i will show you some data
std_inf has only 1 column name std_code number(8)

PHP Code:
insert into std_inf values((select from std_info where std_class=10)); 
it says sub query returns more than one row cause std_class 10 has 4 student in class 10 i want to put his code number in the table std_inf
Reply With Quote
  #4 (permalink)  
Old 06-09-10, 09:00
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,538
do not include both VALUES and SELECT in an INSERT statement
Code:
INSERT 
  INTO std_inf 
SELECT std_code  
  FROM std_info 
 WHERE std_class = 10
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On