Any Php Programmer Here?

equin0x

500 RPM
Senior Member
Joined
Nov 15, 2003
Messages
676
Points
3,018
Location
KL
I was curious is there any PHP programmers here in zth? give some response la.. so at least there is a little discussion on PHP here beside all about cars, my superior cant beat me dead! :lol: when he say i surf for car i'll prove him wrong! so is there any out there?
 
I'm not a php "programmer" but i guess i could do some. I used to do a PHP/MySQL Assignment few weeks ago. But yeah, why anyways?
 
C++? I did that last year, doing Java now, guess i'll be alot confused. But maybe i could help? i don't know. what you need to know? C++ subject? doing what course?
 
Originally posted by FuGZ@Apr 30 2004, 10:53 PM
C++? I did that last year, doing Java now, guess i'll be alot confused. But maybe i could help? i don't know. what you need to know? C++ subject? doing what course?
You mean my major? me major in Network & Communications ..
Very confusing, i'm new to this subject :huh: :o

I love Networking :P

I borrowed a C++ book and photocopy it, need to go through the book if I dont know what is this for ..

veli the confusing leh, those float, double, const :blink: , and those 'spacing', '<<', '>>' :ph34r:
 
Ah i see. Well maybe i could give some pointers, and that's IF i can(recall). Float? double? Hmmm, declaring variables right? or Variable types...
 
DATA TYPES
Name Bytes* Description Range*
char 1 character or integer 8 bits length. signed: -128 to 127 unsigned: 0 to 255

short 2 integer 16 bits length. signed: -32768 to 32767 unsigned: 0 to 65535

long 4 integer 32 bits length. signed:-2147483648 to 2147483647 unsigned: 0 to 4294967295

int * Integer. Its length traditionally depends on the length of the system's Word type, thus in MSDOS it is 16 bits long, whereas in 32 bit systems (like Windows 9x/2000/NT and systems that work under protected mode in x86 systems) it is 32 bits long (4 bytes). See short, long

float 4 floating point number. 3.4e + / - 38 (7 digits)

double 8 double precision floating point number. 1.7e + / - 308 (15 digits)

long double 10 long double precision floating point number. 1.2e + / - 4932 (19 digits)

bool 1 Boolean value. It can take one of two values: true or false NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it. Consult section bool type for compatibility information. true or false

wchar_t 2 Wide character. It is designed as a type to store international characters of a two-byte character set. NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it. wide characters

Muahahaha, i copy paste from somewhere. Actually to do an exercise must really work with the program, else you wouldn't know whether there is errors or warnings in your .cpp .. basket I hate C++ Programming :P

Still not quite understand with the Data types .. sheet .. aiyoyoyo :(
 
Well, if there's anything you need to know about C++, just ask. I'm gonna log off now, i feel tired, it's quite early for bedtime but, i'd do anything for sleep when i feel like sleeping :P chow chow
 
ehh.
me doing PHP/MySQL project now.. but not really good at it.. anyone got some samples to share???
basically need something like booking system, inventory system, etc etc...
 
Booking system? Well, i did a guestbook from scratch. Well, tell me your prob specifically. Or.. Goto some forum sites for mysql/php answers at http://www.phpfreaks.com/forums/.

I'm sure someone experienced will answer your question.
 
hmmmm am trying to learn a wee bit more on pc here, mind telling me what is php guys?
 
it's something like html language but more complex... it has more methods...
 
need a quick help on this 2 php/mysql questions.. got to finish it by saturday..

1. Produce a data base procedure which will delete any service agreement which are out of date.(ie the expiry date is less than the current date)

2. Write a database trigger which fires when a customer buys an item which will discount the retail by 10 % if the customer is a “good customer”.

anyone????
 
How exactly do you have to complete this?

Do you need the user to interact with a webpage with Q2?

Q1 is an integrated automated thingy right?

You are gonna have to link up Apache,MySQL,PHP are you?
 
this one is for another subject.. so will be using java to call and databased stored in oracle

so if u not familiar with java all i need is just the mysql statement for it
the call procedure i think i can manage

q1. yes its an automated process.. so lets say it expires on 7th may 2004
so when the currentdate is 7thmay 2004 it will automatically remove it

q2. will be using java as the user interface.. so when we add a new purchase to a specific customer who is a "good customer" then 10% discount will be given...

all i know is that i have to use triggers and stored procedures in mysql... which i'm not very good at it.. hahaha
hope u can help me out... and also the other sql sifu.....
thanks in advance....
 
Java? Oracle? With mysql? Clueless...

I can think of the logic(how it should be operated, i think), but no, coding, i have no idea how to send it to mysql through java nor oracle. Sorry dude.

But if it's just mysql, sure i can help, i guess.

q1. you're gonna have to retrieve the data first b4 java detects it's expired(if-else) before it sends any commands to trrigger mysql to delete the record.

Something like

SELECT * FROM (the table containing date)
WHERE (date column) <= 'currentdate'; (not sure about the 'currentdate', will check again).

q2. you're gonna have to retrieve the data about the certain customer, to check whether it is a good customer(example, "good customer" set from mysql and an if-else statement to check, to make a decision, discount or not.

About q2 command, maybe i can help, my book's in the car :P he he
 
thanks first
well, its basically java and oracle.. oracle is about the same with mysql

u show me how u get it done in mysql.. then if i understand it then i can try to tackle it.. hehehee .. the two question are under something called Database Triggers & Procedures
 
Using PHP,MySQL,Linux
1. Produce a data base procedure which will delete any service agreement which are out of date.(ie the expiry date is less than the current date)
a. Create a PHP script that connect to database and perform the SQL checking & action
b. Use cron job to run the PHP script every hour using wget command



2. Write a database trigger which fires when a customer buys an item which will discount the retail by 10 % if the customer is a “good customer”.

This one is database scripting ala oracle...don't know whether MySQL can achieve this alone without any help from external script like PHP.
 
trying to tackle problem no 2...
dont seem to work.. anyone can help out?
now using microsoft sql

CREATE TRIGGER goodcustomer
AFTER INSERT OR UPDATE OF Total from Sales
FOR EACH ROW
BEGIN
IF NIC >=3 THEN /* to check good customer */
UPDATE discount from Sales
SET Total = total * 0.10 /* 10% discount */
WHERE Sales = : new.sales;
END IF;
END;
 
Top Bottom