Re: My function returns true but my code does not execute



I use multi-line strings like that all the time. Obviously I use curly
braces, quotes etc correctly (by the second or third attempt) but
there's nothing to stop you using lines like


db_query("CREATE TABLE {$sys['test_db_table_prefix']}idx (
idx_uid MEDIUMINT NOT NULL AUTO_INCREMENT,
idx_added_user VARCHAR(255),
idx_added_dtm DATETIME,

idx_type VARCHAR(255),
idx_category VARCHAR(255),
idx_subcat VARCHAR(255),

idx_name VARCHAR(255),
idx_company VARCHAR(255),
idx_phone VARCHAR(255),
idx_email VARCHAR(255),

idx_street VARCHAR(255),
idx_area VARCHAR(255),
idx_town VARCHAR(255),
idx_near VARCHAR(255),
idx_region VARCHAR(255),
idx_country VARCHAR(255),

idx_area_search VARCHAR(255),
idx_skill_search VARCHAR(255),

idx_other1 VARCHAR(255),
idx_other2 VARCHAR(255),
idx_other3 VARCHAR(255),
idx_other4 VARCHAR(255),
idx_other5 VARCHAR(255),
idx_other6 VARCHAR(255),
idx_other7 VARCHAR(255),
idx_other8 VARCHAR(255),
PRIMARY KEY (idx_uid)
)
");

.



Relevant Pages

  • Re: Beginner Question: How to detect if a file is already exist in the folder
    ... That won´t work because the "\" escapes the first letter of the file ... You have to use braces instead of quotes. ... Prev by Date: ...
    (comp.lang.tcl)
  • Re: Question re: braces and quotes
    ... difference whether or not I used braces, quotes, or any combination. ... LOCKFILE is proper, and why? ... echo "braces no quotes $LOCKFILE" ...
    (comp.unix.shell)
  • Re: get current date
    ... code using barewords here, "quotes" there and elsewhere. ... put aside the obvious substitution-issue, ... Using {braces} sometimes allows the bytecode compiler to do a better ...
    (comp.lang.tcl)
  • Re: Question re: braces and quotes
    ... echo "braces no quotes $LOCKFILE" ... None of the above examples need the braces or quotes. ...
    (comp.unix.shell)
  • Re: Problem with exec command
    ... | I am pretty much a novice, but had a similar problem recently. ... | $webaddress wouldn't substitute in braces ... ... and in addition he said to use 'list' instead of quotes to ... up the webaddress in question (yes, ...
    (comp.lang.tcl)