Search found 42 matches

by bdeonline
Thu Feb 21, 2008 3:26 pm
Forum: PHP - Code
Topic: MS Word plain text
Replies: 3
Views: 274

Re: MS Word plain text

Thing is I want to show the tags. I don't want word to render it.
by bdeonline
Thu Feb 21, 2008 2:33 pm
Forum: PHP - Code
Topic: MS Word plain text
Replies: 3
Views: 274

MS Word plain text

I have a php file that exports a plain text file. If I open the text file in a notepad it shows correctly. When I open it in MS Word it looses all the tags. Is there a additional header or something to get Word to stop trying to render the tags & display as plain text?   header('Cache-Control: n...
by bdeonline
Thu Sep 29, 2005 12:45 pm
Forum: PHP - Code
Topic: PHP isset return blank
Replies: 3
Views: 388

much less complicated: change isset to !empty Not sure what you mean wouldn't help much also thinking about it I can't send it to a function to check because if the variable doesn't exsist then it will generate a error instead. <?php echo (!empty($form)) ? $form['email'] : ''; ?> This is the closes...
by bdeonline
Thu Sep 29, 2005 11:29 am
Forum: PHP - Code
Topic: PHP isset return blank
Replies: 3
Views: 388

PHP isset return blank

I'm trying to find a easier way to test if a variable isset and echo its value on large forms. Basicly I want to be able to echo the varible value if it has one or just be blank if it don't without getting a error and not just hidding the error with @. Here is the way I am doing it currently: <?php ...
by bdeonline
Mon Sep 19, 2005 10:42 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

Never mind this seems to work better and is easier to understand: SELECT items.id, pages.title, items.ordering FROM items JOIN pages USING (id) UNION DISTINCT SELECT items.id, links.title, items.ordering FROM items JOIN links USING (id) And this does just what I want: (SELECT items.id, pages.title, ...
by bdeonline
Mon Sep 19, 2005 10:29 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

Thats what I am seeing aswell.

Ok then why can't I use a right join, is it because the field types don't all match up.
by bdeonline
Mon Sep 19, 2005 10:21 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

Wait I think I am getting it looking up the sytax using:

Code: Select all

SELECT items.id, CONCAT_WS(null, pages.title, links.title), items.ordering  FROM items
LEFT JOIN pages ON items.id = pages.id
LEFT JOIN links ON items.id = links.id
Does work is that the best way to do this.
by bdeonline
Mon Sep 19, 2005 10:17 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

I'm not understanding, I get that CONCAT will join together strings but can't get it to join together fields.
by bdeonline
Mon Sep 19, 2005 9:33 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

I've tried this but the title field is comming up NULL: SELECT items.id, CONCAT(pages.title, links.title) AS title, items.ordering FROM items LEFT JOIN pages ON items.id = pages.id LEFT JOIN links ON items.id = links.id The title fields of both are the same type, lenght, and collation. I think its b...
by bdeonline
Mon Sep 19, 2005 9:22 am
Forum: Databases
Topic: Getting two title fields to join
Replies: 9
Views: 1225

Getting two title fields to join

Is there any way to get two title fields to join together in one query here is what I have so far: SELECT items.id, *.title, items.ordering FROM items LEFT JOIN pages ON items.id = pages.id LEFT JOIN links ON items.id = links.id I've got the pages table joining items and then have the links table jo...
by bdeonline
Mon Jul 18, 2005 10:56 am
Forum: PHP - Security
Topic: Using real_escape_string() on a int field
Replies: 47
Views: 20076

Using real_escape_string() on a int field

I've got a small question, do I need to use real_escape_string on post and get if the data type in the database is a integer. Is there anyway that someone could get evil code into a integer field, and would real_escape_string help in anyway?
by bdeonline
Fri Jul 15, 2005 10:32 am
Forum: Databases
Topic: [SOLVED]Getting data and checking off in one field
Replies: 3
Views: 994

Well for at least my own record and for anyone else needing a answer to this problem I have figured it out: $antennas = null; $checked = false; $result = $db->query('SELECT antennas_id FROM antennas_to_products WHERE products_id=' . $_GET['id']); while($row = $db->fetch_assoc($result)) { $antennas[]...
by bdeonline
Fri Jul 15, 2005 7:51 am
Forum: Databases
Topic: [SOLVED]Getting data and checking off in one field
Replies: 3
Views: 994

So does anyone know how I can get all the antennas and have checked or selected the ones that are already associated to the product.
by bdeonline
Thu Jul 14, 2005 1:49 pm
Forum: Databases
Topic: [SOLVED]Getting data and checking off in one field
Replies: 3
Views: 994

$result = $db->query('SELECT a.id, a.title, ap.antennas_id FROM antennas_to_products AS ap, antennas AS a WHERE ap.products_id=' . $_GET['id']); while($row = $db->fetch_assoc($result)) { if($row['id'] == $row['antennas_id']) { echo '<input type="checkbox" name="antennas[]" value...
by bdeonline
Thu Jul 14, 2005 1:34 pm
Forum: Databases
Topic: [SOLVED]Getting data and checking off in one field
Replies: 3
Views: 994

[SOLVED]Getting data and checking off in one field

Ok I have 2 tables antennas and antennas_to_products I need to get a checkbox of all antennas but the ones that are linked to a product needs to be checked. Here is what I have so far. $result = $db->query('SELECT ap.antennas_id, a.id, a.title FROM antennas_to_products AS ap JOIN antennas AS a ON a....