Jump to content

Recommended Posts

Ok i've got a table with a field called "terminated".

0 = employed, 1 = byebye

 

Here's the query

<?php
$emp_list_query = "SELECT firstname, lastname FROM table_ad WHERE manager = '$wholename' AND terminated = '0' ORDER BY firstname ASC LIMIT 0, 11";
?>

 

This causes a syntax error near 'terminated. My assumption is because of the work which is probably a predefined MySQL function or something.

 

I've tried placing the fieldname 'terminated' into single quotes but that just doesnt return anything at all. No error, but no data either.

 

 

What's the deal here?

Link to comment
https://forums.phpfreaks.com/topic/179243-solved-mysqlphp-query-issue/
Share on other sites

let me get this straight. when you put WHERE teminated=0 it retrieves the rows that have terminated with a value of 1. that doesn't make any sense. are you sure the fields in your database are how you expect them to me

 

EDIT: ok i was about to say

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.