Odd behaviour - creating mysql DB and table at random

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kc11
Forum Commoner
Posts: 73
Joined: Mon Sep 27, 2010 3:26 pm

Odd behaviour - creating mysql DB and table at random

Post by kc11 »

Hi everyone,

I have a script that contains the self explanatory functions createDB and createTable ( the first creates a database and the second creates a table within it ). In the past these have worked sequentially to create a DB and table during a single script run ( the expected behaviour ). I am noticing that sometimes the createDB function does not work and sometimes createTable does not work, but sometimes they do. I can't figure out why they don't work together every time. They almost never work together. Has anyone seen this behavior ? I am using the pdo extension.

Thank you,

KC
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: Odd behaviour - creating mysql DB and table at random

Post by phphelpme »

I cant really say I have experienced that before because they either work or they dont unless you have a fault server setup maybe. If you code works and sometimes does not it could be a slight error that sometimes gets bypassed but I bet it has something to do with the server setup and my advice would be to just reset your server maybe back to default settings and see it this still occurs.

It would help if we could see the code just to make sure that code has not been changed so as a fault now exists maybe.

Best wishes
Post Reply