[PHP-DB] CMS-Blog system

2008-09-03 Thread Martin Zvarík
Hi, I am working on CMS-Blog system, which will be using approx. 10 000 users. I have a basic question - I believe there are only two options - which one is better? 1) having separate databases for each blog = fast (problem: what if I will need to do search in all of the blogs for some

[PHP-DB] Separate or 1 database ?

2008-09-03 Thread Martin Zvarík
I have a basic question - I believe there are only two options - which one is better? 1) having separate databases for each blog = fast (problem: what if I will need to do search for article in all of the blogs for some?) 2) having all blogs in ONE database - that might be 10 000 * 100

[PHP-DB] Performance (lots of tables / databases...)

2008-09-27 Thread Martin Zvarík
Hi, I am working on a blog system and I am currently thinking of what would be the best DB approach. I have read lots about wordpress and other blog's optimizations and DB structure, but I have not found any mention of having separate database for each blog/user. So, my question is, which

Re: [PHP-DB] Performance (lots of tables / databases...)

2008-09-27 Thread Martin Zvarík
be not the best solution. Martin Zvarík napsal(a): Hi, I am working on a blog system and I am currently thinking of what would be the best DB approach. I have read lots about wordpress and other blog's optimizations and DB structure, but I have not found any mention of having separate database

Re: [PHP-DB] Performance (lots of tables / databases...)

2008-09-27 Thread Martin Zvarík
Lester Caine: danaketh wrote: Hi, the first choice is probably the best for you. When you think about second solution, it will be a nightmare when you have 1000+ databases and have to administrate them from one central system (if you're about to do it like this). The third solution looks

Re: [PHP-DB] Performance (lots of tables / databases...)

2008-09-28 Thread Martin Zvarík
with one database and separate schema for each blog. For Mysql I think I'd go for a database each blog. Jack 2008/9/28 Martin Zvarík [EMAIL PROTECTED] Hi, I am working on a blog system and I am currently thinking of what would be the best DB approach. I have read lots about wordpress and other

[PHP-DB] Re: Could not run query

2008-09-28 Thread Martin Zvarík
Have you tested this SQL query? Insert it into phpmyadmin, does it work? If it does = php error. If it doesn't = mysql error. boclair napsal(a): I need help to track down the cause of the error,Could not run query A typical query is $laterrecords = mysql_query(SELECT * FROM messages WHERE

Re: [PHP-DB] Could not run query

2008-09-28 Thread Martin Zvarík
The quotes are OK. Tested - works. danaketh napsal(a): Well, seems to me like a problem with quotes you're using in query... The ` quotes you're using doesn't work, when I tried to use them in PHP called query. Maybe you should try use single quotes and if they works. boclair napsal(a): I

[PHP-DB] Re: question about Zend PHP Studio ...Zend gave useless answer

2008-12-02 Thread Martin Zvarík
Can you explain what does it have to do with Zend PHP Studio (the PHP editor) ? Fred Silsbee napsal(a): I have Fedora 9/Apache 2/PHP 5.2.6 Everything is great but I cannot add the libraries for oci8 1.3.4 I have in a directory. The entries are grayed out. I was getting an error

[PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Martin Zvarík
This will work: $sql = SELECT admin.AdminID, workorders.WHAT_YOU_WANT FROM admin INNER JOIN workorders ON admin.AdminID=workorders.AdminID HAVING admin.username='.$_SESSION['user'].' ; Terion Miller napsal(a): Hi Everyone! I am having problems getting an INNER JOIN to work and need some tips

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Martin Zvarík
, workorders.WorkOrderID FROM admin INNER JOIN workorders ON admin.AdminID=workorders.AdminID HAVING admin.username='tmiller' $result2$row2 Terion On Thu, Jan 29, 2009 at 11:56 AM, Martin Zvarík mzva...@gmail.com wrote: This will work: $sql = SELECT admin.AdminID, workorders.WHAT_YOU_WANT FROM

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Martin Zvarík
believe this is proving so hard.. Thanks for helping! Terion On Thu, Jan 29, 2009 at 12:55 PM, Martin Zvarík mzva...@gmail.com mailto:mzva...@gmail.com wrote: What I wrote with HAVING doesn't do any difference - replace back to WHERE. Your query is OK. Try: echo mysql_error

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Martin Zvarík
and have tried all manners of different ways to tell mySql if admin ID = session user then get workorders where orderID = admin ID On Thu, Jan 29, 2009 at 1:28 PM, Martin Zvarík mzva...@gmail.com mailto:mzva...@gmail.com wrote: Are you sure you have MORE than ONE [order + admin

[PHP-DB] SQL for counting comments - is this smart?

2009-03-16 Thread Martin Zvarík
Is it smart to use all of this on one page? Or should I rather do one SQL and let PHP count it? $q = $DB-q(SELECT COUNT(*) FROM comments); $int_total = $DB-frow($q); $q = $DB-q(SELECT COUNT(*) FROM comments WHERE approved IS NULL); $int_waiting = $DB-frow($q); $q = $DB-q(SELECT COUNT(*) FROM

[PHP-DB] MySQL - LIMIT 1 on primary KEY - makes sense?

2009-06-03 Thread Martin Zvarík
SELECT * FROM xxx WHERE primary_id=123 LIMIT 1 Is it useless (LIMIT 1) ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySQL - LIMIT 1 on primary KEY - makes sense?

2009-06-03 Thread Martin Zvarík
Bastien Koert napsal(a): 2009/6/3 Martin Zvarík mzva...@gmail.com: SELECT * FROM xxx WHERE primary_id=123 LIMIT 1 Is it useless (LIMIT 1) ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It doesn't do anything...you are already

[PHP-DB] Re: finding out if a user left our website ?

2010-08-27 Thread Martin Zvarík
Dne 25.8.2010 22:32, Vinay Kannan napsal(a): Hello Guys, Wanted to know if there is a way for us to find out, when a user moves away from our website( closing the window and entering a different url in the address bar ) closing the window i guess, we could use the javascript onclose or