Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Bromrrrrr

    searching with php for multiple keywords...

    You need to write your query dynamically. When you search for '%blue widgets%' you search for any record where the exact string 'blue widgets' apears, not for the individual words. $search = 'blue widgets'; // spit the words into an array $keywords = split(' ', $search); $sql = 'SELECT text...
  2. Bromrrrrr

    Call to undefined function

    No, not hard at all. use function_exists to check if the function exists and if it doesn't (it doesn't in your case) define it yourself as in: if (!function_exists('checkdnsrr') { function checkdnsrr($host, $type='') { // Use one of the implementations on the php.net // checkdnsrr...
  3. Bromrrrrr

    using multiples queries

    Assuming from your query that you're trying to get the number of pictures for each category, this is what I would try: SELECT c.*, COUNT (p.PIC_ID) AS PIC_COUNT FROM PHOTOCATEGORIES c LEFT JOIN PHOTOPICTURES p ON p.PIC_CAT = c.CAT_ID GROUP BY c.CAT_ID Hope this helps, Brommrrrr
  4. Bromrrrrr

    Exchange a subselect with appropriate syntax in mySQL

    Hmm well I'm not sure about your DB setup (or about my solution really :-)) but I'd try something like: SELECT * FROM Object O LEFT JOIN Booking B ON (B.ObjectName = O.Name AND (B.startDate >= ? AND B.startDate < ? OR B.stopDate > ? AND B.stopDate <= ? OR B.startDate <= ? AND B.stopDate >= ?))...
  5. Bromrrrrr

    Date comparisons

    Hmmm that's a bit much, there's more convenient way: SELECT TO_DAYS(end) - TO_DAYS(start) FROM table That gives the number of days without any need for scripting Cheers, Bromrrrr
  6. Bromrrrrr

    Maddening MySql question

    Try looking at the query that gets passed to MySQL. If you try to insert empty values (as in INSERT INTO table (field1, field2) VALUES ('', '') )then MySQL won't return an error but it won't insert anything either. Hope this helps, Bromrrrr
  7. Bromrrrrr

    nested select not working with MySQL

    Would I lie to you? :-)...I'm dead serious. Future versions will support nesting but I have no idea what version that will be.
  8. Bromrrrrr

    Disable the downloads of a CAB file

    Make sure all of your CFforms have the attribute ENABLECAB=&quot;no&quot;, the default for this is &quot;yes&quot;. Hope this helps, Brommrrrr
  9. Bromrrrrr

    nested select not working with MySQL

    It won't work, nested queries and MySQL don't mix :-(. From the MySQL manual: The following will not yet work in MySQL: SELECT * FROM table1 WHERE id IN (SELECT id FROM table2); SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM table2); SELECT * FROM table1 WHERE NOT EXISTS (SELECT id...
  10. Bromrrrrr

    Convert syntax to MySql

    Actually that should read INDEX table_index (email) if you want to give your index a name. Sorry 'bout that
  11. Bromrrrrr

    Convert syntax to MySql

    Try: CREATE TABLE #url.JobId# (id INTEGER PRIMARY KEY AUTO_INCREMENT, email VARCHAR(30) NOT NULL , SectionNumber INTEGER, INDEX(email)) This should do it all in one query.... Hope this helps, Brommrrrr
  12. Bromrrrrr

    MySQL Commands

    Ehrm....no offence, but first of all I would suggest you do some reading!. This shouldn't be a problem, especially for someone who 'knows' php. your $result gives back a resource id because it is in fact a resource id, read the php documentation on how to use it. Someone who 'knows' php should...
  13. Bromrrrrr

    CF password protection...

    This error usually occurs when you have some sort of error in your SQL. From reading your post I gathered (excuse me if I'm wrong :-)) that you have two fields in your table named &quot;securitylogin&quot; and &quot;securitypassword&quot; but in your SQL you're trying to access them as...
  14. Bromrrrrr

    Getting the value of a dynaminc variable...

    Mind you, I'm not really sure on this one and I have no way of testing it at the moment, but I'd try something like: <CFSET Tmp=&quot;Form.act_pay_&quot; & id> #Evaluate(tmp)# I'm not sure I've got it exactly right, but it should work using the evaluate function. Hope this helps, Brommrrrr
  15. Bromrrrrr

    default page for duplicate values

    You could use cftry/cfcatch like: <CFTRY> <CFQUERY NAME=&quot;MyQRY&quot; DATASOURCE=&quot;MyDSN&quot;> *insert query that might go wrong* </CFQUERY> <CFCATCH TYPE=&quot;database&quot;> *insert error handling* </CFCATCH> </CFTRY> In the cfcatch tag you can redirect users to a general...
  16. Bromrrrrr

    Kill Session

    You can use Structclear(Session)....it gets rid off all session variables. Bromrrrr
  17. Bromrrrrr

    What is the best way to handle external database uploading

    Yes there is a way :-)...CF needs a local database to work with but you can use Access to link to tables in another database, this way you can create a local db for cf to use but the actual data can be in any Access db on your network <br><br>Hope this helps,<br><br>Bromrrrrr
  18. Bromrrrrr

    Server Busy???

    Ehrm, this might sound obvious, but you did ask for clues :-)....your server might be working perfectly but are you sure it's actually up and running when you are opening a .cfm page? <br>I've had the same errors when the CF server wasn't actually running, the web server would try to bring up...
  19. Bromrrrrr

    SQL Column names with embedded spaces

    try aliasing the fieldnames that contain spaces like:<br><br><FONT FACE=monospace>&lt;CFQUERY name=&quot;SomeQuery&quot; datasource=&quot;alldata&quot;&gt;<br>select [field name with embedded spaces].mydata AS FieldWithoutSpaces<br>from mydata<br>&lt;/CFquery&gt;</font><br><br>Then reference the...
  20. Bromrrrrr

    AutoSend CFMAIL...

    You can simply create a page that sends your email using CFMAIL and then setup a scheduled task in CF administrator to run your page at a certain time.<br><br>Hope this helps,<br><br>Bromrrr

Part and Inventory Search

Back
Top