Re: local v remote



blueboy wrote:
On my localhost this works fine

$result= mysql_query("SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM NEWS");
while ($row = mysql_fetch_assoc($result)) {

but on my remote i get a mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

Can someone expalin the problem? PHP version problem?

No. It's MySQL problem.
If it works fine locally, then make sure the table structure is the same on your remote database as it is on your local database.

---
mysql_query("SELECT date_format(date, '%d/%m/%Y') as date, title,
id, display FROM NEWS") or die(mysql_error());
---


Using that die statement will also help while debugging your script as it will print out any errors that are caused by your SQL statement. Which you then ask some mysql people if that is the case.


Darren
.



Relevant Pages

  • Re: [PHP] local v remote
    ... On Thu, May 31, 2007 4:50 am, blueboy wrote: ... id, display FROM NEWS"); ... but on my remote i get a mysql_fetch_assoc: ... valid MySQL result resource ...
    (php.general)
  • SUMMARY: remote CDE logins
    ... access by any client (e.g. xterm running on what you call your server). ... your "DISPLAY" is what is serving X to the X application ... xhost + will disable access control, so anyone can access your X server. ... Do you want an entire CDE login session from the remote machine ...
    (Tru64-UNIX-Managers)
  • Re: how to start X service
    ... Can I have multiple sessions of X running at the same time? ... opens the first X-session on the default display 0. ... To enable several concurrent GUI logins on different local consoles under ... - Telnet the remote server. ...
    (RedHat)
  • Re: programatically stop svchost.exe?
    ... WebClient - Display Name- WebClient ... Purpose: Enables Windows-based programs to create, access, ... RemoteRegistry - Display Name: Remote Registry ...
    (microsoft.public.vc.mfc)
  • programatically stop svchost.exe?
    ... WebClient - Display Name- WebClient ... Purpose: Enables Windows-based programs to create, access, ... RemoteRegistry - Display Name: Remote Registry ...
    (microsoft.public.vc.mfc)