Search found 15 matches

by wckf
Thu Apr 04, 2013 2:41 pm
Forum: PHP coding => General
Topic: auto increment varchar !
Replies: 2
Views: 833

auto increment varchar !

ideas anyone ?
by wckf
Thu Apr 04, 2013 11:17 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

UPDATE leads SET lead_no='LEA'+cast(leadid as char)

this took the number from the id field and puted it nto the lead_no field but without the LEA
by wckf
Thu Apr 04, 2013 10:56 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

what i meant is i have a field in a table where i want it to auto increment with letters nside
e.g :
lea1
lea2
lea3
.
.
.
forget about the foreign key thing :)
by wckf
Thu Apr 04, 2013 9:58 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

guys can i put a foreign key auto increment ?
with letters like :
lea1
lea2
lea3
.
.
.
?
by wckf
Thu Apr 04, 2013 9:46 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

.
by wckf
Thu Apr 04, 2013 9:02 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

already did that maybe it is because both of them have to same primary key ?
by wckf
Thu Apr 04, 2013 8:14 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

Re: transfer data

this is what happened when i entered your code #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition = true' at line 5 otherwise when i do it without the WHERE condition = true it gives me this : #1452...
by wckf
Thu Apr 04, 2013 7:34 am
Forum: PHP coding => General
Topic: transfer data
Replies: 12
Views: 1698

transfer data

hi guys,
how can i transfer data from one table to another using phpmyadmin sql query ,
both have the same primary key
by wckf
Sun Mar 31, 2013 11:15 am
Forum: PHP coding => General
Topic: Driving me crazy !
Replies: 1
Views: 588

Driving me crazy !

$query = "UPDATE customers SET fname = $name, address = $address, pnumber = $pnumber, email = $email WHERE iD = $id " ; if($query_run = mysql_query($query)){ echo'sucess'; } else { echo 'please retry another time'; } something is wrong with this code !
by wckf
Fri Mar 29, 2013 8:01 am
Forum: PHP coding => General
Topic: error in code!!!
Replies: 4
Views: 907

Re: error in code!!!

i also created another database and called the field name the same thing happened !!!
by wckf
Fri Mar 29, 2013 7:47 am
Forum: PHP coding => General
Topic: error in code!!!
Replies: 4
Views: 907

Re: error in code!!!

the name is fName and i have no one without the value of the name !!!
by wckf
Fri Mar 29, 2013 6:00 am
Forum: PHP coding => Mail
Topic: mail not being sent !!!!!
Replies: 1
Views: 2922

mail not being sent !!!!!

<?php if (isset($_POST["from"]) && isset($_POST["to"]) && isset($_POST["subject"]) && isset($_POST["message"]) ) { $from = $_POST["from"] ; $to = $_POST["to"]; $subject = $_POST["subject"] ; $message = $_POST["message"] ; $header = $from; } ini_set ("SMTP", "smtp.bell.ca"); $sendmail = mail($to, $su...
by wckf
Fri Mar 29, 2013 5:54 am
Forum: PHP coding => General
Topic: error in code!!!
Replies: 4
Views: 907

error in code!!!

<?php require 'connect.inc.php'; if(isset($_POST["id"])){ $id = $_POST["id"];} if (!empty($id)){ $query = "SELECT * FROM customers WHERE id = $id "; if ($query_run = mysql_query($query)){ while ($query_row = mysql_fetch_assoc($query_run)){ $fname = $query_row['fName']; $Email = $query_row['Email']; ...
by wckf
Wed Mar 27, 2013 9:28 am
Forum: PHP coding => General
Topic: code check please
Replies: 3
Views: 884

Re: code check please

Thnk your for your help actually my problem now is with this line of code : $query= "SELECT 'Name' FROM 'customer' WHERE 'Name'='$name'"; $query_run = mysql_query($query); if (mysql_num_rows($query_run)==1){ echo $name.'already exists.'; } thanks:)
by wckf
Wed Mar 27, 2013 8:01 am
Forum: PHP coding => General
Topic: code check please
Replies: 3
Views: 884

code check please

what is wrong with this code !!! if(isset($_POST["name"])&&isset($_POST["email"])&&isset($_POST["pnumber"])&&($_POST["address"])){ $name = $_POST["name"]; $email = $_POST["email"]; $pnumber= $_POST["pnumber"]; $address = $_POST["address"]; if (!empty($name)&& !empty($email)&& !empty($pnumber)&& !emp...