something wrong with this code

General discussions related to php

Moderators: macek, egami, gesf

Post Reply
User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

try this

Post by ruturajv » Sun Jul 06, 2003 8:48 am

$the_query = "select * from tablename where staffid = " . $staffid;
be sure there is a variable staffid defined

and if the column typeof staffid is char then

$the_query = "select * from tablename where staffid = '" . $staffid . "'";
should be the query

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Post by bezmond » Sun Jul 06, 2003 10:47 am

Please don't cross-post. See this page also for my own response:

http://www.php-forum.com/p/viewtopic.php?t=2448

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Post by bezmond » Mon Jul 07, 2003 1:02 am

again, see my post on the other page and you will hopefully find there are no remaining errors.

Andrew

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests